python - Virtualenv is attempting to install in system directory -


i ran problem earlier, trying install gevent in virtualenv. tried few different things, including few export commands, installing xcode command line tools, installing gcc compiler... none of worked.

in process, managed screw virtualenv install. have removed virtualenv directory , attempting recreate it, no luck. i've uninstalled , reinstalled virtualenv (using pip) , still getting following error after running following command.

command:

virtualenv env 

i'd know why looking in /library installation directory. there setting somewhere fix that?

update v2: removed virtual burrito

ouput --verbose:

creating env/lib/python2.7 symlinking python bootstrap modules symlinking env/lib/python2.7/config symlinking env/lib/python2.7/lib-dynload symlinking env/lib/python2.7/os.py ignoring built-in bootstrap module: posix symlinking env/lib/python2.7/posixpath.py cannot import bootstrap module: nt symlinking env/lib/python2.7/ntpath.py symlinking env/lib/python2.7/genericpath.py symlinking env/lib/python2.7/fnmatch.py symlinking env/lib/python2.7/locale.py symlinking env/lib/python2.7/encodings symlinking env/lib/python2.7/codecs.py symlinking env/lib/python2.7/stat.py symlinking env/lib/python2.7/userdict.py symlinking env/lib/python2.7/copy_reg.py symlinking env/lib/python2.7/types.py symlinking env/lib/python2.7/re.py symlinking env/lib/python2.7/sre.py symlinking env/lib/python2.7/sre_parse.py symlinking env/lib/python2.7/sre_constants.py symlinking env/lib/python2.7/sre_compile.py symlinking env/lib/python2.7/warnings.py symlinking env/lib/python2.7/linecache.py symlinking env/lib/python2.7/_abcoll.py symlinking env/lib/python2.7/abc.py symlinking env/lib/python2.7/_weakrefset.py creating env/lib/python2.7/site-packages writing env/lib/python2.7/site.py writing env/lib/python2.7/orig-prefix.txt writing env/lib/python2.7/no-global-site-packages.txt creating parent directories env/include symlinking env/include/python2.7 creating env/bin new python executable in env/bin/python changed mode of env/bin/python 0755 symlinking env/.python testing executable env/bin/python -c "import sys;out=sys.stdout;getattr(out, "buffer", out).write(sys.prefix.encode("utf-8"))" got sys.prefix result: u'/users/aharwood/documents/sucode/mds-item-read-svc/env' creating env/lib/python2.7/distutils writing env/lib/python2.7/distutils/__init__.py writing env/lib/python2.7/distutils/distutils.cfg using existing setuptools egg: /library/python/2.7/site-packages/virtualenv-1.9.1-py2.7.egg/virtualenv_support/setuptools-0.6c11-py2.7.egg installing setuptools... error: can't create or remove files in install directory following error occurred while trying add or remove files in installation directory:   [errno 13] permission denied: '/library/python/2.7/site-packages/test-easy-install-3535.write-test' installation directory specified (via --install-dir, --prefix, or distutils default setting) was:   /library/python/2.7/site-packages/ perhaps account not have write access directory?  if installation directory system-owned directory, may need sign in administrator or "root" account.  if not have administrative access machine, may wish choose different installation directory, preferably 1 listed in pythonpath environment variable. information on other options, may wish consult documentation at:   http://peak.telecommunity.com/easyinstall.html please make appropriate changes system , try again. complete output command /users/aharwood/docu...d-svc/env/bin/python -c "#!python \"\"\"bootstra...sys.argv[1:])       " /library/python/2.7/...ols-0.6c11-py2.7.egg: error: can't create or remove files in install directory  following error occurred while trying add or remove files in installation directory:  [errno 13] permission denied: '/library/python/2.7/site-packages/test-easy-install-3535.write-test'  installation directory specified (via --install-dir, --prefix, or distutils default setting) was:  /library/python/2.7/site-packages/  perhaps account not have write access directory?  if installation directory system-owned directory, may need sign in administrator or "root" account.  if not have administrative access machine, may wish choose different installation directory, preferably 1 listed in pythonpath environment variable.  information on other options, may wish consult documentation at:  http://peak.telecommunity.com/easyinstall.html  please make appropriate changes system , try again.  ---------------------------------------- ...installing setuptools...done. traceback (most recent call last):   file "/usr/local/bin/virtualenv", line 8, in <module> load_entry_point('virtualenv==1.9.1', 'console_scripts', 'virtualenv')() file "/library/python/2.7/site-packages/virtualenv-1.9.1-py2.7.egg/virtualenv.py", line 979, in main no_pip=options.no_pip) file "/library/python/2.7/site-packages/virtualenv-1.9.1-py2.7.egg/virtualenv.py", line 1091, in create_environment search_dirs=search_dirs, never_download=never_download) file "/library/python/2.7/site-packages/virtualenv-1.9.1-py2.7.egg/virtualenv.py", line 611, in install_setuptools search_dirs=search_dirs, never_download=never_download) file "/library/python/2.7/site-packages/virtualenv-1.9.1-py2.7.egg/virtualenv.py", line 583, in _install_req cwd=cwd) file "/library/python/2.7/site-packages/virtualenv-1.9.1-py2.7.egg/virtualenv.py", line 1057, in call_subprocess % (cmd_desc, proc.returncode)) oserror: command /users/aharwood/docu...d-svc/env/bin/python -c "#!python \"\"\"bootstra...sys.argv[1:])       " /library/python/2.7/...ols-0.6c11-py2.7.egg failed error code 1 

update v3: found 1 of things did try install gevent. cause problem?

sudo port install libevent cflags="-i /opt/local/include -l /opt/local/lib" pip install gevent 

this line looks suspicious:

using existing setuptools egg: /users/aharwood/.venvburrito/lib/python/virtualenv-1.9.1-py2.7.egg/virtualenv_support/setuptools-0.6c11-py2.7.egg 

are actively using virtualenv-burrito? i'm not sure does, looking @ install file changes shell's startup commands, may causing problems.

i try , move out of way, open new terminal window, , see if running virtualenv works again:

mv ~/.venvburrito ~/.venvburrito.disabled 

if solves problem, remove more permanently:

rm -fr ~/.venvburrito.disabled 

it installs code in 1 of these files (depending on shell):

~/.bash_profile ~/.zprofile ~/.profile 

you remove code, looks won't cause problems if leave in.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -