Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mkvirtualenv: Too many levels of symbolic links

I am running virtualenv burrito and getting an error that there are too many levels of symbolic links. I have no idea what that means.

mkvirtualenv --python /usr/local/bin/Python3 mantis 

Error:

Running virtualenv with interpreter /usr/local/bin/Python3 Using base prefix '/Library/Frameworks/Python.framework/Versions/3.4' New python executable in mantis/bin/Python3 Also creating executable in mantis/bin/python Traceback (most recent call last):   File "/Users/croberts/.venvburrito/lib/python2.7/site-packages/virtualenv.py", line 2352, in <module>     main()   File "/Users/croberts/.venvburrito/lib/python2.7/site-packages/virtualenv.py", line 825, in main     symlink=options.symlink)   File "/Users/croberts/.venvburrito/lib/python2.7/site-packages/virtualenv.py", line 985, in create_environment     site_packages=site_packages, clear=clear, symlink=symlink))   File "/Users/croberts/.venvburrito/lib/python2.7/site-packages/virtualenv.py", line 1439, in install_python     raise e   File "/Users/croberts/.venvburrito/lib/python2.7/site-packages/virtualenv.py", line 1431, in install_python     stdout=subprocess.PIPE)   File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/subprocess.py", line 859, in __init__     restore_signals, start_new_session)   File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/subprocess.py", line 1457, in _execute_child     raise child_exception_type(errno_num, err_msg) OSError: [Errno 62] Too many levels of symbolic links 

I was getting this error before and solved it by doing Python3.4 instead of Python3. Now it won't work no matter which python I try to use. Even if I try to use the default (2.7)

like image 341
Chase Roberts Avatar asked May 04 '15 21:05

Chase Roberts


People also ask

How do you remove a symbolic link?

To remove a symbolic link, use either the rm or unlink command followed by the name of the symlink as an argument. When removing a symbolic link that points to a directory do not append a trailing slash to the symlink name.


2 Answers

Strangely, I ran into this when I tried to create a virtualenv with a name that already existed. Solution to remove the old and create a new one:

rmvirtualenv old-one mkvirtualenv new-one 
like image 87
mlissner Avatar answered Sep 24 '22 21:09

mlissner


I had the same problem on OSX.

I got rid of it after:

1. removing env folder 2. removing __pycache__ folder 
like image 33
Sven Avatar answered Sep 23 '22 21:09

Sven