0

When I open my terminal on my macOS machine, I am greeted with the following message:

virtualenvwrapper_run_hook:12: no such file or directory: /usr/local/bin/python3.7 virtualenvwrapper.sh: There was a problem running the initialization hooks.

If Python could not import the module virtualenvwrapper.hook_loader, check that virtualenvwrapper has been installed for VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3.7 and that PATH is set properly.

I have the following:

Python3 --version
Python 3.8.5

How can I go about fixing this?

Related: PyCharm error: Cannot run program, error=2, No such file or directory

halfer
  • 19,824
  • 17
  • 99
  • 186
The Pointer
  • 2,226
  • 7
  • 22
  • 50
  • If you want to use virtualenvwrapper, maybe [re]install it? `/usr/local/bin/python3.7 -m pip install virtualenvwrapper` – jkr Aug 03 '20 at 05:10
  • @jakub See my edit. I now have Python 3.8.5 – The Pointer Aug 03 '20 at 05:11
  • @jakub Do I modify it to `export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3.7`? – The Pointer Aug 03 '20 at 05:15
  • No. Check which python you are using by default with `which python3`, and then set `VIRTUALENVWRAPPER_PYTHON` to whatever path that gives you. – jkr Aug 03 '20 at 05:16
  • 1
    @jakub Ahh, ok. I get `/usr/local/opt/python@3.8/bin/Python3`, so `export VIRTUALENVWRAPPER_PYTHON=/usr/local/opt/python@3.8/bin/Python3`? – The Pointer Aug 03 '20 at 05:17
  • I executed that command and restarted my terminal, but I'm still getting the same message. – The Pointer Aug 03 '20 at 05:19

0 Answers0