0

I'm on Mac OS 10.15.4 and installed python according to the instructions here, under the "What we should do" section.

➜ which python3
/Users/miguel/.pyenv/shims/python3

➜ which virtualenvwrapper.sh
/Users/miguel/.pyenv/shims/virtualenvwrapper.sh

➜ which pip
/Users/miguel/.pyenv/shims/pip

➜ pip freeze
...
virtualenv==20.0.21
virtualenv-clone==0.5.4
virtualenvwrapper==4.8.4

➜ pip install virtualenvwrapper
Requirement already satisfied: virtualenvwrapper in ./.pyenv/versions/3.7.3/lib/python3.7/site-packages (4.8.4)
Requirement already satisfied: virtualenv in ./.pyenv/versions/3.7.3/lib/python3.7/site-packages (from virtualenvwrapper) (20.0.21)
Requirement already satisfied: virtualenv-clone in ./.pyenv/versions/3.7.3/lib/python3.7/site-packages (from virtualenvwrapper) (0.5.4)
Requirement already satisfied: stevedore in ./.pyenv/versions/3.7.3/lib/python3.7/site-packages (from virtualenvwrapper) (1.32.0)
Requirement already satisfied: distlib<1,>=0.3.0 in ./.pyenv/versions/3.7.3/lib/python3.7/site-packages (from virtualenv->virtualenvwrapper) (0.3.0)
Requirement already satisfied: appdirs<2,>=1.4.3 in ./.pyenv/versions/3.7.3/lib/python3.7/site-packages (from virtualenv->virtualenvwrapper) (1.4.4)
Requirement already satisfied: filelock<4,>=3.0.0 in ./.pyenv/versions/3.7.3/lib/python3.7/site-packages (from virtualenv->virtualenvwrapper) (3.0.12)
Requirement already satisfied: importlib-metadata<2,>=0.12; python_version < "3.8" in ./.pyenv/versions/3.7.3/lib/python3.7/site-packages (from virtualenv->virtualenvwrapper) (1.6.0)
Requirement already satisfied: six<2,>=1.9.0 in ./.pyenv/versions/3.7.3/lib/python3.7/site-packages (from virtualenv->virtualenvwrapper) (1.15.0)
Requirement already satisfied: pbr!=2.1.0,>=2.0.0 in ./.pyenv/versions/3.7.3/lib/python3.7/site-packages (from stevedore->virtualenvwrapper) (5.4.5)
Requirement already satisfied: zipp>=0.5 in ./.pyenv/versions/3.7.3/lib/python3.7/site-packages (from importlib-metadata<2,>=0.12; python_version < "3.8"->virtualenv->virtualenvwrapper) (3.1.0)

I was then trying to follow the installation instructions here. However, after running source .zshrc the Terminal prints

/Users/miguel/.zshrc:source:20: no such file or directory: /usr/local/bin/virtualenvwrapper.sh

I then tried to change the location of virtualenvwrapper in .zshrc given what which virtualenvwrapper.sh returned so instead of

export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel
source /usr/local/bin/virtualenvwrapper.sh

which is what the linked instructions specify, I added

export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel
source /Users/miguel/.pyenv/shims/virtualenvwrapper.sh

This created another problem which makes the Terminal open with just this

Last login: Sat May 30 22:53:46 on ttys000

[Process completed]

I found another answer here to deal with this, but I still can't solve my problem, still stuck at this step.

EDIT:

Another thing I tried was the accepted answer here.

Running

➜ find / -name virtualenvwrapper.sh

Found these two:

/Users/miguel/.pyenv/versions/3.7.3/bin/virtualenvwrapper.sh
/Users/miguel/.pyenv/shims/virtualenvwrapper.sh
mcansado
  • 1,440
  • 1
  • 15
  • 29
  • Does this answer your question? [Where is virtualenvwrapper.sh after pip install?](https://stackoverflow.com/questions/12647266/where-is-virtualenvwrapper-sh-after-pip-install) – Ann Zen May 30 '20 at 22:20
  • I came across that answer as well, I just edited my question to include that info. – mcansado May 30 '20 at 22:37
  • Ok this worked actually! I thought I'd tried both of the paths that the find command returned but hadn't tried the /Users/miguel/.pyenv/versions/3.7.3/bin/virtualenvwrapper.sh after I added this one to the .zshrc file it worked. Thank you! – mcansado May 30 '20 at 22:41

0 Answers0