Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to solve "bad interpreter: Too many levels of symbolic links"

I am trying to install numpy in a virtual environment that I created. I used the following series of commands to create and activate and then installing a local version of numpy (all these after cd-ing into the project folder).

virtualenv venv
source venv/bin/activate
pip install numpy

However, after the last command, I get this error:

bash: /home/fieldsofgold/Desktop/test/venv/bin/pip: /home/fieldsofgold/Desktop/test/venv/bin/python: bad interpreter: Too many levels of symbolic links

Could anyone please help me solve it and let me know what could be going wrong?

I am using Ubuntu 14.04 in VirtualBox, and the python version is 2.7.6.

like image 781
QPTR Avatar asked Jul 29 '15 09:07

QPTR


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.


1 Answers

I had the same issue, and solved it simply by removing the old env file with rm -rf env. Then I created a new environment with virtualenv env, followed by installing the requirements, normally pip install -r requirements.txt, then I was able to run my app successfully.

like image 58
Mark Francis Avatar answered Oct 12 '22 02:10

Mark Francis