lena
lena

Reputation: 83

-bash: /usr/local/bin/python: No such file or directory

When I run workon env1,

-bash: /usr/local/bin/python: No such file or directory
-bash: /usr/local/bin/python: No such file or directory

displays (the same line twice). However, I am in env1, as it shows up in my command prompt. When I run which virtualenvwrapper.sh, I get

/Library/Frameworks/Python.framework/Versions/3.4/bin/virtualenvwrapper.sh

I saw another thread that said to run ln -s /Library/Frameworks/Python.framework/Versions/3.4/bin/virtualenvwrapper.sh /usr/local/bin/virtualenvwrapper.sh which gave me

ln: /usr/local/bin/virtualenvwrapper.sh: File exists

I installed the wrapper through sudo -H pip install virtualenvwrapper

Not really sure where to go from here.

Upvotes: 2

Views: 7535

Answers (1)

Christian Long
Christian Long

Reputation: 11514

For me, there was a link in /usr/local/bin to python2. I created another one, linking the same file to python.

$ cd /usr/local/bin

# The /usr/local/bin/python2 symlink exists already.
$ ls -al python2

lrwxr-xr-x 1 a_user a_group 37 Jul 26 09:54 /usr/local/bin/python2 -> ../Cellar/python/2.7.13_1/bin/python2

# Make a symlink for python. The path for the python2
# symlink on your system might be different from this
# example. Just use whatever path the python2 symlink
# is pointing to on your system.
$ ln -s ../Cellar/python/2.7.13_1/bin/python2 python

# Now the symlink exists at /usr/local/bin/python
$ ls -al python

lrwxr-xr-x 1 a_user a_group 37 Jul 26 14:29 python -> ../Cellar/python/2.7.13_1/bin/python2*

Upvotes: 1

Related Questions