PIP not installing to virtualenv directoryubuntu 11.04 install mysqldb for custom python2.5virtualenv gcc error MySQL-pythonPython eggs are not imported for Apache2 mod_wsgiError while installing with Python “pip”: Cannot fetch index base URL http://Python's 3.4a LEFOVERSHow do I re-compile python?How should virtualenv be set up in a production Web server (user, location, etc.)Django 1.10.3 Apache wsgi - ImportError: cannot import name signalsLinux “which virtualenv-2.7” shows a repeating pathError when trying install mod_wsgi using pip
As programers say: Strive to be lazy
Help in identifying a mystery wall socket
What kind of SATA connector is this?
What episode was being referenced by this part of Discovery's season 2 episode 13 recap?
Solubility in different pressure conditions
what does a native speaker say when he wanted to leave his work?
Is there anything special about -1 (0xFFFFFFFF) regarding ADC?
Safety when modifying old electrical work
Why do I get two different answers when solving for arclength?
Why is tomato paste so cheap?
What's the difference between "за ... от" and "в ... от"?
Is taking modulus on both sides of an equation valid?
Why was Endgame Thanos so different than Infinity War Thanos?
Do I need to say 'o`clock'?
Does SQL Server allow (make visible) DDL inside a transaction to the transaction prior to commit?
Entering the UK as a British citizen who is a Canadian permanent resident
Why is it harder to turn a motor/generator with shorted terminals?
Area under the curve - Integrals (Antiderivatives)
What is the best way for a skeleton to impersonate human without using magic?
Was this character’s old age look CGI or make-up?
Why does my circuit work on a breadboard, but not on a perfboard? I am new to soldering
How can a layman easily get the consensus view of what academia *thinks* about a subject?
What to do if SUS scores contradict qualitative feedback?
Smallest Guaranteed hash collision cycle length
PIP not installing to virtualenv directory
ubuntu 11.04 install mysqldb for custom python2.5virtualenv gcc error MySQL-pythonPython eggs are not imported for Apache2 mod_wsgiError while installing with Python “pip”: Cannot fetch index base URL http://Python's 3.4a LEFOVERSHow do I re-compile python?How should virtualenv be set up in a production Web server (user, location, etc.)Django 1.10.3 Apache wsgi - ImportError: cannot import name signalsLinux “which virtualenv-2.7” shows a repeating pathError when trying install mod_wsgi using pip
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I am attempting to install django to a virtualenv that already exists.
Following the instructions listed on the pip-install website here, I ran the following from SSH.
name@server:~$ . myenv.env/bin/activate
(myenv.env)nam@server:~$ pip install django
However at the bottom of the installation, I am seeing this:
creating /usr/local/lib/python2.7/dist-packages/django
error: could not create '/usr/local/lib/python2.7/dist-packages/django': Permission denied
It appears that it is trying to install it to the global directory. I do not have sudo privileges. Am I doing something wrong here?
Update:
$PATH = /var/django/myenv.env/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
python installation packages virtualenv pip
|
show 6 more comments
I am attempting to install django to a virtualenv that already exists.
Following the instructions listed on the pip-install website here, I ran the following from SSH.
name@server:~$ . myenv.env/bin/activate
(myenv.env)nam@server:~$ pip install django
However at the bottom of the installation, I am seeing this:
creating /usr/local/lib/python2.7/dist-packages/django
error: could not create '/usr/local/lib/python2.7/dist-packages/django': Permission denied
It appears that it is trying to install it to the global directory. I do not have sudo privileges. Am I doing something wrong here?
Update:
$PATH = /var/django/myenv.env/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
python installation packages virtualenv pip
Does it work correctly for other packages? Do you have the same problem if you useeasy_install
?
– larsks
Jul 26 '13 at 17:28
Same problem with other packages. And I believe easy_install requires sudo and would install into the global directory.
– Luke Sapan
Jul 26 '13 at 17:53
Nope, setting up a virtualenv gets you easy_install as well as pip. You can typewhich easy_install
to see if you're using your virtualenv or the system one.
– larsks
Jul 26 '13 at 17:55
Actually, are you sure you're running pip from inside the virtualenv? What doeswhich pip
yield? And do you seepip
insidemyenv.env/bin/
?
– larsks
Jul 26 '13 at 17:56
I do see pip inside of myenv.env/bin/. I just tried "activating" my env again, and despite being in that mode, "which pip" and "which easy_install" both return "usr/local/bin/pip" and "usr/bin/easy_install" respectively.
– Luke Sapan
Jul 26 '13 at 18:20
|
show 6 more comments
I am attempting to install django to a virtualenv that already exists.
Following the instructions listed on the pip-install website here, I ran the following from SSH.
name@server:~$ . myenv.env/bin/activate
(myenv.env)nam@server:~$ pip install django
However at the bottom of the installation, I am seeing this:
creating /usr/local/lib/python2.7/dist-packages/django
error: could not create '/usr/local/lib/python2.7/dist-packages/django': Permission denied
It appears that it is trying to install it to the global directory. I do not have sudo privileges. Am I doing something wrong here?
Update:
$PATH = /var/django/myenv.env/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
python installation packages virtualenv pip
I am attempting to install django to a virtualenv that already exists.
Following the instructions listed on the pip-install website here, I ran the following from SSH.
name@server:~$ . myenv.env/bin/activate
(myenv.env)nam@server:~$ pip install django
However at the bottom of the installation, I am seeing this:
creating /usr/local/lib/python2.7/dist-packages/django
error: could not create '/usr/local/lib/python2.7/dist-packages/django': Permission denied
It appears that it is trying to install it to the global directory. I do not have sudo privileges. Am I doing something wrong here?
Update:
$PATH = /var/django/myenv.env/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
python installation packages virtualenv pip
python installation packages virtualenv pip
edited Jul 26 '13 at 18:40
Luke Sapan
asked Jul 26 '13 at 17:21
Luke SapanLuke Sapan
621111
621111
Does it work correctly for other packages? Do you have the same problem if you useeasy_install
?
– larsks
Jul 26 '13 at 17:28
Same problem with other packages. And I believe easy_install requires sudo and would install into the global directory.
– Luke Sapan
Jul 26 '13 at 17:53
Nope, setting up a virtualenv gets you easy_install as well as pip. You can typewhich easy_install
to see if you're using your virtualenv or the system one.
– larsks
Jul 26 '13 at 17:55
Actually, are you sure you're running pip from inside the virtualenv? What doeswhich pip
yield? And do you seepip
insidemyenv.env/bin/
?
– larsks
Jul 26 '13 at 17:56
I do see pip inside of myenv.env/bin/. I just tried "activating" my env again, and despite being in that mode, "which pip" and "which easy_install" both return "usr/local/bin/pip" and "usr/bin/easy_install" respectively.
– Luke Sapan
Jul 26 '13 at 18:20
|
show 6 more comments
Does it work correctly for other packages? Do you have the same problem if you useeasy_install
?
– larsks
Jul 26 '13 at 17:28
Same problem with other packages. And I believe easy_install requires sudo and would install into the global directory.
– Luke Sapan
Jul 26 '13 at 17:53
Nope, setting up a virtualenv gets you easy_install as well as pip. You can typewhich easy_install
to see if you're using your virtualenv or the system one.
– larsks
Jul 26 '13 at 17:55
Actually, are you sure you're running pip from inside the virtualenv? What doeswhich pip
yield? And do you seepip
insidemyenv.env/bin/
?
– larsks
Jul 26 '13 at 17:56
I do see pip inside of myenv.env/bin/. I just tried "activating" my env again, and despite being in that mode, "which pip" and "which easy_install" both return "usr/local/bin/pip" and "usr/bin/easy_install" respectively.
– Luke Sapan
Jul 26 '13 at 18:20
Does it work correctly for other packages? Do you have the same problem if you use
easy_install
?– larsks
Jul 26 '13 at 17:28
Does it work correctly for other packages? Do you have the same problem if you use
easy_install
?– larsks
Jul 26 '13 at 17:28
Same problem with other packages. And I believe easy_install requires sudo and would install into the global directory.
– Luke Sapan
Jul 26 '13 at 17:53
Same problem with other packages. And I believe easy_install requires sudo and would install into the global directory.
– Luke Sapan
Jul 26 '13 at 17:53
Nope, setting up a virtualenv gets you easy_install as well as pip. You can type
which easy_install
to see if you're using your virtualenv or the system one.– larsks
Jul 26 '13 at 17:55
Nope, setting up a virtualenv gets you easy_install as well as pip. You can type
which easy_install
to see if you're using your virtualenv or the system one.– larsks
Jul 26 '13 at 17:55
Actually, are you sure you're running pip from inside the virtualenv? What does
which pip
yield? And do you see pip
inside myenv.env/bin/
?– larsks
Jul 26 '13 at 17:56
Actually, are you sure you're running pip from inside the virtualenv? What does
which pip
yield? And do you see pip
inside myenv.env/bin/
?– larsks
Jul 26 '13 at 17:56
I do see pip inside of myenv.env/bin/. I just tried "activating" my env again, and despite being in that mode, "which pip" and "which easy_install" both return "usr/local/bin/pip" and "usr/bin/easy_install" respectively.
– Luke Sapan
Jul 26 '13 at 18:20
I do see pip inside of myenv.env/bin/. I just tried "activating" my env again, and despite being in that mode, "which pip" and "which easy_install" both return "usr/local/bin/pip" and "usr/bin/easy_install" respectively.
– Luke Sapan
Jul 26 '13 at 18:20
|
show 6 more comments
6 Answers
6
active
oldest
votes
Sorry for a year late answer! I had the same problem and fixed it, I don't know if you changed the name of a directory after creating the virtual environment, I did though. If so then here's what I did.
1.) deactivate
your v-env. After the fix you need to restart the v-env, so might as well deactivate
now. right?
2.) Now, since we created the v-env in a different path, we have to change the static path variables in these files.
To get pip working you don't need to do this, but I still do.bin/activate
,bin/activate.csh
,bin/activate.fish
bin/pip
,bin/pip2
,bin/pip2.7
bin/easy_install
,bin/easy_install2.7
3.) To get pip working, you must correct the python interpreter in the pip file, this as well has a static interpreter location set by virtualenv in the creation process.
4.) To get easy_install working? You guessed it, fix the interpreter location.
I hope this helped for any people reading this in the future. Sorry OP, for being late.
Yeah that was exactly it. In my case I was able to just re-create the virtualenv from scratch and that solved it.
– Luke Sapan
Jun 6 '15 at 16:29
Glad to be of help
– Crispy
Jun 6 '15 at 16:41
I'm so glad to finally find an answer. For me, using sed in the venv folder made the job a lot easier. Something likegrep -rli '/path/to/old/env/bin' * | xargs -i@ sed -i 's//path/to/old/env/bin//path/to/new/env/bin/g' @
.source
– Keith
Feb 25 '17 at 6:56
add a comment |
I had this same problem.
I deleted the virtual environment and created a new one, which solved the problem.
Probably not the answer you were hoping for, but since it's the only one...
add a comment |
Well without administrative privileges you're very limited on what you are able to do. If you are not allowed to elevate yourself or ask for privileges, the best way I found to go about that would be to create another environment, make a requirements.txt file, download all the packages you need to your machine( django ) that would also be located in your requirements file and it should work.
add a comment |
Had the same problem. In my case the reason was that the created virtual env was for python2.7 (the default) but I was using pip3 to install a package. pip3 was not present in my virtualenv so it defaulted to the global one. For me the fix was to use
virtualenv flask --python=python3
to create the env.
add a comment |
I had encountered the same problem caused by renaming of user.
Crispy's answer is totally right. And my solution may be more convenient.
setps:
1. Enter your virtual environment's bin path, such as cd ~/virenv_dir/bin
2. Rename all files under this directory using sed command. sed -i 's/old_name/new_name/' *
add a comment |
In my case, I had defined two aliases (to overcome some other issue on the default python version):
alias pip='/usr/bin/pip3'
alias python='/usr/bin/python3'
And this was causing the same symptoms:
[Errno 13] Permission denied: '/usr/lib/python3.6/site-packages'
Removing the aliases solved the issue (before or after creating the virtualenv)
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f526594%2fpip-not-installing-to-virtualenv-directory%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
6 Answers
6
active
oldest
votes
6 Answers
6
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sorry for a year late answer! I had the same problem and fixed it, I don't know if you changed the name of a directory after creating the virtual environment, I did though. If so then here's what I did.
1.) deactivate
your v-env. After the fix you need to restart the v-env, so might as well deactivate
now. right?
2.) Now, since we created the v-env in a different path, we have to change the static path variables in these files.
To get pip working you don't need to do this, but I still do.bin/activate
,bin/activate.csh
,bin/activate.fish
bin/pip
,bin/pip2
,bin/pip2.7
bin/easy_install
,bin/easy_install2.7
3.) To get pip working, you must correct the python interpreter in the pip file, this as well has a static interpreter location set by virtualenv in the creation process.
4.) To get easy_install working? You guessed it, fix the interpreter location.
I hope this helped for any people reading this in the future. Sorry OP, for being late.
Yeah that was exactly it. In my case I was able to just re-create the virtualenv from scratch and that solved it.
– Luke Sapan
Jun 6 '15 at 16:29
Glad to be of help
– Crispy
Jun 6 '15 at 16:41
I'm so glad to finally find an answer. For me, using sed in the venv folder made the job a lot easier. Something likegrep -rli '/path/to/old/env/bin' * | xargs -i@ sed -i 's//path/to/old/env/bin//path/to/new/env/bin/g' @
.source
– Keith
Feb 25 '17 at 6:56
add a comment |
Sorry for a year late answer! I had the same problem and fixed it, I don't know if you changed the name of a directory after creating the virtual environment, I did though. If so then here's what I did.
1.) deactivate
your v-env. After the fix you need to restart the v-env, so might as well deactivate
now. right?
2.) Now, since we created the v-env in a different path, we have to change the static path variables in these files.
To get pip working you don't need to do this, but I still do.bin/activate
,bin/activate.csh
,bin/activate.fish
bin/pip
,bin/pip2
,bin/pip2.7
bin/easy_install
,bin/easy_install2.7
3.) To get pip working, you must correct the python interpreter in the pip file, this as well has a static interpreter location set by virtualenv in the creation process.
4.) To get easy_install working? You guessed it, fix the interpreter location.
I hope this helped for any people reading this in the future. Sorry OP, for being late.
Yeah that was exactly it. In my case I was able to just re-create the virtualenv from scratch and that solved it.
– Luke Sapan
Jun 6 '15 at 16:29
Glad to be of help
– Crispy
Jun 6 '15 at 16:41
I'm so glad to finally find an answer. For me, using sed in the venv folder made the job a lot easier. Something likegrep -rli '/path/to/old/env/bin' * | xargs -i@ sed -i 's//path/to/old/env/bin//path/to/new/env/bin/g' @
.source
– Keith
Feb 25 '17 at 6:56
add a comment |
Sorry for a year late answer! I had the same problem and fixed it, I don't know if you changed the name of a directory after creating the virtual environment, I did though. If so then here's what I did.
1.) deactivate
your v-env. After the fix you need to restart the v-env, so might as well deactivate
now. right?
2.) Now, since we created the v-env in a different path, we have to change the static path variables in these files.
To get pip working you don't need to do this, but I still do.bin/activate
,bin/activate.csh
,bin/activate.fish
bin/pip
,bin/pip2
,bin/pip2.7
bin/easy_install
,bin/easy_install2.7
3.) To get pip working, you must correct the python interpreter in the pip file, this as well has a static interpreter location set by virtualenv in the creation process.
4.) To get easy_install working? You guessed it, fix the interpreter location.
I hope this helped for any people reading this in the future. Sorry OP, for being late.
Sorry for a year late answer! I had the same problem and fixed it, I don't know if you changed the name of a directory after creating the virtual environment, I did though. If so then here's what I did.
1.) deactivate
your v-env. After the fix you need to restart the v-env, so might as well deactivate
now. right?
2.) Now, since we created the v-env in a different path, we have to change the static path variables in these files.
To get pip working you don't need to do this, but I still do.bin/activate
,bin/activate.csh
,bin/activate.fish
bin/pip
,bin/pip2
,bin/pip2.7
bin/easy_install
,bin/easy_install2.7
3.) To get pip working, you must correct the python interpreter in the pip file, this as well has a static interpreter location set by virtualenv in the creation process.
4.) To get easy_install working? You guessed it, fix the interpreter location.
I hope this helped for any people reading this in the future. Sorry OP, for being late.
answered Jun 6 '15 at 16:07
CrispyCrispy
1461
1461
Yeah that was exactly it. In my case I was able to just re-create the virtualenv from scratch and that solved it.
– Luke Sapan
Jun 6 '15 at 16:29
Glad to be of help
– Crispy
Jun 6 '15 at 16:41
I'm so glad to finally find an answer. For me, using sed in the venv folder made the job a lot easier. Something likegrep -rli '/path/to/old/env/bin' * | xargs -i@ sed -i 's//path/to/old/env/bin//path/to/new/env/bin/g' @
.source
– Keith
Feb 25 '17 at 6:56
add a comment |
Yeah that was exactly it. In my case I was able to just re-create the virtualenv from scratch and that solved it.
– Luke Sapan
Jun 6 '15 at 16:29
Glad to be of help
– Crispy
Jun 6 '15 at 16:41
I'm so glad to finally find an answer. For me, using sed in the venv folder made the job a lot easier. Something likegrep -rli '/path/to/old/env/bin' * | xargs -i@ sed -i 's//path/to/old/env/bin//path/to/new/env/bin/g' @
.source
– Keith
Feb 25 '17 at 6:56
Yeah that was exactly it. In my case I was able to just re-create the virtualenv from scratch and that solved it.
– Luke Sapan
Jun 6 '15 at 16:29
Yeah that was exactly it. In my case I was able to just re-create the virtualenv from scratch and that solved it.
– Luke Sapan
Jun 6 '15 at 16:29
Glad to be of help
– Crispy
Jun 6 '15 at 16:41
Glad to be of help
– Crispy
Jun 6 '15 at 16:41
I'm so glad to finally find an answer. For me, using sed in the venv folder made the job a lot easier. Something like
grep -rli '/path/to/old/env/bin' * | xargs -i@ sed -i 's//path/to/old/env/bin//path/to/new/env/bin/g' @
.source– Keith
Feb 25 '17 at 6:56
I'm so glad to finally find an answer. For me, using sed in the venv folder made the job a lot easier. Something like
grep -rli '/path/to/old/env/bin' * | xargs -i@ sed -i 's//path/to/old/env/bin//path/to/new/env/bin/g' @
.source– Keith
Feb 25 '17 at 6:56
add a comment |
I had this same problem.
I deleted the virtual environment and created a new one, which solved the problem.
Probably not the answer you were hoping for, but since it's the only one...
add a comment |
I had this same problem.
I deleted the virtual environment and created a new one, which solved the problem.
Probably not the answer you were hoping for, but since it's the only one...
add a comment |
I had this same problem.
I deleted the virtual environment and created a new one, which solved the problem.
Probably not the answer you were hoping for, but since it's the only one...
I had this same problem.
I deleted the virtual environment and created a new one, which solved the problem.
Probably not the answer you were hoping for, but since it's the only one...
answered Mar 3 '14 at 15:43
MarkMark
1516
1516
add a comment |
add a comment |
Well without administrative privileges you're very limited on what you are able to do. If you are not allowed to elevate yourself or ask for privileges, the best way I found to go about that would be to create another environment, make a requirements.txt file, download all the packages you need to your machine( django ) that would also be located in your requirements file and it should work.
add a comment |
Well without administrative privileges you're very limited on what you are able to do. If you are not allowed to elevate yourself or ask for privileges, the best way I found to go about that would be to create another environment, make a requirements.txt file, download all the packages you need to your machine( django ) that would also be located in your requirements file and it should work.
add a comment |
Well without administrative privileges you're very limited on what you are able to do. If you are not allowed to elevate yourself or ask for privileges, the best way I found to go about that would be to create another environment, make a requirements.txt file, download all the packages you need to your machine( django ) that would also be located in your requirements file and it should work.
Well without administrative privileges you're very limited on what you are able to do. If you are not allowed to elevate yourself or ask for privileges, the best way I found to go about that would be to create another environment, make a requirements.txt file, download all the packages you need to your machine( django ) that would also be located in your requirements file and it should work.
answered Mar 3 '14 at 16:48
secure212secure212
1531210
1531210
add a comment |
add a comment |
Had the same problem. In my case the reason was that the created virtual env was for python2.7 (the default) but I was using pip3 to install a package. pip3 was not present in my virtualenv so it defaulted to the global one. For me the fix was to use
virtualenv flask --python=python3
to create the env.
add a comment |
Had the same problem. In my case the reason was that the created virtual env was for python2.7 (the default) but I was using pip3 to install a package. pip3 was not present in my virtualenv so it defaulted to the global one. For me the fix was to use
virtualenv flask --python=python3
to create the env.
add a comment |
Had the same problem. In my case the reason was that the created virtual env was for python2.7 (the default) but I was using pip3 to install a package. pip3 was not present in my virtualenv so it defaulted to the global one. For me the fix was to use
virtualenv flask --python=python3
to create the env.
Had the same problem. In my case the reason was that the created virtual env was for python2.7 (the default) but I was using pip3 to install a package. pip3 was not present in my virtualenv so it defaulted to the global one. For me the fix was to use
virtualenv flask --python=python3
to create the env.
answered Nov 20 '15 at 14:10
AdversusAdversus
1163
1163
add a comment |
add a comment |
I had encountered the same problem caused by renaming of user.
Crispy's answer is totally right. And my solution may be more convenient.
setps:
1. Enter your virtual environment's bin path, such as cd ~/virenv_dir/bin
2. Rename all files under this directory using sed command. sed -i 's/old_name/new_name/' *
add a comment |
I had encountered the same problem caused by renaming of user.
Crispy's answer is totally right. And my solution may be more convenient.
setps:
1. Enter your virtual environment's bin path, such as cd ~/virenv_dir/bin
2. Rename all files under this directory using sed command. sed -i 's/old_name/new_name/' *
add a comment |
I had encountered the same problem caused by renaming of user.
Crispy's answer is totally right. And my solution may be more convenient.
setps:
1. Enter your virtual environment's bin path, such as cd ~/virenv_dir/bin
2. Rename all files under this directory using sed command. sed -i 's/old_name/new_name/' *
I had encountered the same problem caused by renaming of user.
Crispy's answer is totally right. And my solution may be more convenient.
setps:
1. Enter your virtual environment's bin path, such as cd ~/virenv_dir/bin
2. Rename all files under this directory using sed command. sed -i 's/old_name/new_name/' *
edited Nov 13 '17 at 18:11
Vaibhav Panmand
761411
761411
answered Nov 13 '17 at 12:11
xialuxialu
1
1
add a comment |
add a comment |
In my case, I had defined two aliases (to overcome some other issue on the default python version):
alias pip='/usr/bin/pip3'
alias python='/usr/bin/python3'
And this was causing the same symptoms:
[Errno 13] Permission denied: '/usr/lib/python3.6/site-packages'
Removing the aliases solved the issue (before or after creating the virtualenv)
add a comment |
In my case, I had defined two aliases (to overcome some other issue on the default python version):
alias pip='/usr/bin/pip3'
alias python='/usr/bin/python3'
And this was causing the same symptoms:
[Errno 13] Permission denied: '/usr/lib/python3.6/site-packages'
Removing the aliases solved the issue (before or after creating the virtualenv)
add a comment |
In my case, I had defined two aliases (to overcome some other issue on the default python version):
alias pip='/usr/bin/pip3'
alias python='/usr/bin/python3'
And this was causing the same symptoms:
[Errno 13] Permission denied: '/usr/lib/python3.6/site-packages'
Removing the aliases solved the issue (before or after creating the virtualenv)
In my case, I had defined two aliases (to overcome some other issue on the default python version):
alias pip='/usr/bin/pip3'
alias python='/usr/bin/python3'
And this was causing the same symptoms:
[Errno 13] Permission denied: '/usr/lib/python3.6/site-packages'
Removing the aliases solved the issue (before or after creating the virtualenv)
answered May 2 at 20:03
coderazzicoderazzi
1012
1012
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f526594%2fpip-not-installing-to-virtualenv-directory%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Does it work correctly for other packages? Do you have the same problem if you use
easy_install
?– larsks
Jul 26 '13 at 17:28
Same problem with other packages. And I believe easy_install requires sudo and would install into the global directory.
– Luke Sapan
Jul 26 '13 at 17:53
Nope, setting up a virtualenv gets you easy_install as well as pip. You can type
which easy_install
to see if you're using your virtualenv or the system one.– larsks
Jul 26 '13 at 17:55
Actually, are you sure you're running pip from inside the virtualenv? What does
which pip
yield? And do you seepip
insidemyenv.env/bin/
?– larsks
Jul 26 '13 at 17:56
I do see pip inside of myenv.env/bin/. I just tried "activating" my env again, and despite being in that mode, "which pip" and "which easy_install" both return "usr/local/bin/pip" and "usr/bin/easy_install" respectively.
– Luke Sapan
Jul 26 '13 at 18:20