Virtualenv permission denied












7















After a lot of struggle with virtualenv/virtualenvwrapper I decided to remove all virtualenvs and re-install the packages.



root> su myuser
myuser> sudo pip install virtualenv
myuser> sudo pip install virtualenvwrapper


I proceeded to add this to my unix users .bashrc file.



export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python2.7
source /usr/local/bin/virtualenvwrapper.sh


When I source .bashrc I get about 20 error lines ending with IOError: [Errno 13] Permission denied: '/root/.virtualenvs/premkproject'. I'm running out of ideas...



I have done my homework and tried every suggested solution I could find. I'm running Ubuntu 12.04.










share|improve this question























  • You are using root or other user

    – Otto
    Nov 29 '16 at 16:47
















7















After a lot of struggle with virtualenv/virtualenvwrapper I decided to remove all virtualenvs and re-install the packages.



root> su myuser
myuser> sudo pip install virtualenv
myuser> sudo pip install virtualenvwrapper


I proceeded to add this to my unix users .bashrc file.



export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python2.7
source /usr/local/bin/virtualenvwrapper.sh


When I source .bashrc I get about 20 error lines ending with IOError: [Errno 13] Permission denied: '/root/.virtualenvs/premkproject'. I'm running out of ideas...



I have done my homework and tried every suggested solution I could find. I'm running Ubuntu 12.04.










share|improve this question























  • You are using root or other user

    – Otto
    Nov 29 '16 at 16:47














7












7








7


1






After a lot of struggle with virtualenv/virtualenvwrapper I decided to remove all virtualenvs and re-install the packages.



root> su myuser
myuser> sudo pip install virtualenv
myuser> sudo pip install virtualenvwrapper


I proceeded to add this to my unix users .bashrc file.



export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python2.7
source /usr/local/bin/virtualenvwrapper.sh


When I source .bashrc I get about 20 error lines ending with IOError: [Errno 13] Permission denied: '/root/.virtualenvs/premkproject'. I'm running out of ideas...



I have done my homework and tried every suggested solution I could find. I'm running Ubuntu 12.04.










share|improve this question














After a lot of struggle with virtualenv/virtualenvwrapper I decided to remove all virtualenvs and re-install the packages.



root> su myuser
myuser> sudo pip install virtualenv
myuser> sudo pip install virtualenvwrapper


I proceeded to add this to my unix users .bashrc file.



export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python2.7
source /usr/local/bin/virtualenvwrapper.sh


When I source .bashrc I get about 20 error lines ending with IOError: [Errno 13] Permission denied: '/root/.virtualenvs/premkproject'. I'm running out of ideas...



I have done my homework and tried every suggested solution I could find. I'm running Ubuntu 12.04.







permissions bashrc virtualenv virtualenvwrapper






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 28 '13 at 18:19







user229566




















  • You are using root or other user

    – Otto
    Nov 29 '16 at 16:47



















  • You are using root or other user

    – Otto
    Nov 29 '16 at 16:47

















You are using root or other user

– Otto
Nov 29 '16 at 16:47





You are using root or other user

– Otto
Nov 29 '16 at 16:47










1 Answer
1






active

oldest

votes


















0














sudo pip install virtualenv


The sudo means you're installing virtualenv with root. You need to install virtualenv to the user profile instead with just:



pip install virtualenv





share|improve this answer


























  • That's the exact opposite of what the answers here suggest...

    – CGFoX
    Sep 27 '18 at 12:59











  • 1) That thread is specifically for dealing with system level packages 2) That thread comes with the warning: running pip as sudo can dangerously affect your OS files. You run major risks of harming your system, and there are ways to set up your machine so that you don't need to use sudo. 3) This user specifically uses su myuser to avoid being root, then uses sudo which undoes that.

    – Morifen
    Oct 3 '18 at 19:44














Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f396912%2fvirtualenv-permission-denied%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown
























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














sudo pip install virtualenv


The sudo means you're installing virtualenv with root. You need to install virtualenv to the user profile instead with just:



pip install virtualenv





share|improve this answer


























  • That's the exact opposite of what the answers here suggest...

    – CGFoX
    Sep 27 '18 at 12:59











  • 1) That thread is specifically for dealing with system level packages 2) That thread comes with the warning: running pip as sudo can dangerously affect your OS files. You run major risks of harming your system, and there are ways to set up your machine so that you don't need to use sudo. 3) This user specifically uses su myuser to avoid being root, then uses sudo which undoes that.

    – Morifen
    Oct 3 '18 at 19:44


















0














sudo pip install virtualenv


The sudo means you're installing virtualenv with root. You need to install virtualenv to the user profile instead with just:



pip install virtualenv





share|improve this answer


























  • That's the exact opposite of what the answers here suggest...

    – CGFoX
    Sep 27 '18 at 12:59











  • 1) That thread is specifically for dealing with system level packages 2) That thread comes with the warning: running pip as sudo can dangerously affect your OS files. You run major risks of harming your system, and there are ways to set up your machine so that you don't need to use sudo. 3) This user specifically uses su myuser to avoid being root, then uses sudo which undoes that.

    – Morifen
    Oct 3 '18 at 19:44
















0












0








0







sudo pip install virtualenv


The sudo means you're installing virtualenv with root. You need to install virtualenv to the user profile instead with just:



pip install virtualenv





share|improve this answer















sudo pip install virtualenv


The sudo means you're installing virtualenv with root. You need to install virtualenv to the user profile instead with just:



pip install virtualenv






share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 12 '17 at 5:36









muru

1




1










answered Jan 11 '17 at 22:03









MorifenMorifen

213




213













  • That's the exact opposite of what the answers here suggest...

    – CGFoX
    Sep 27 '18 at 12:59











  • 1) That thread is specifically for dealing with system level packages 2) That thread comes with the warning: running pip as sudo can dangerously affect your OS files. You run major risks of harming your system, and there are ways to set up your machine so that you don't need to use sudo. 3) This user specifically uses su myuser to avoid being root, then uses sudo which undoes that.

    – Morifen
    Oct 3 '18 at 19:44





















  • That's the exact opposite of what the answers here suggest...

    – CGFoX
    Sep 27 '18 at 12:59











  • 1) That thread is specifically for dealing with system level packages 2) That thread comes with the warning: running pip as sudo can dangerously affect your OS files. You run major risks of harming your system, and there are ways to set up your machine so that you don't need to use sudo. 3) This user specifically uses su myuser to avoid being root, then uses sudo which undoes that.

    – Morifen
    Oct 3 '18 at 19:44



















That's the exact opposite of what the answers here suggest...

– CGFoX
Sep 27 '18 at 12:59





That's the exact opposite of what the answers here suggest...

– CGFoX
Sep 27 '18 at 12:59













1) That thread is specifically for dealing with system level packages 2) That thread comes with the warning: running pip as sudo can dangerously affect your OS files. You run major risks of harming your system, and there are ways to set up your machine so that you don't need to use sudo. 3) This user specifically uses su myuser to avoid being root, then uses sudo which undoes that.

– Morifen
Oct 3 '18 at 19:44







1) That thread is specifically for dealing with system level packages 2) That thread comes with the warning: running pip as sudo can dangerously affect your OS files. You run major risks of harming your system, and there are ways to set up your machine so that you don't need to use sudo. 3) This user specifically uses su myuser to avoid being root, then uses sudo which undoes that.

– Morifen
Oct 3 '18 at 19:44




















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • 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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f396912%2fvirtualenv-permission-denied%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

is 'sed' thread safe

How to make a Squid Proxy server?