clay
clay

Reputation: 20440

MacOS Python 3.7 virtualenv fails?

My system is running MacOS and Homebrew and it recently updated to Python 3.7.

Now, just creating a new virtualenv and trying to use it fails.

FYI, I don't actually need Python 3.7. I didn't upgrade on purpose. I'd prefer the latest stable, supported version, but of course, I want the basics working.

➜  rm -rf ~/.virtualenvs/test
➜  python3 -m venv ~/.virtualenvs/test
➜  vex --path ~/.virtualenvs/test python
zsh: /usr/local/bin/vex: bad interpreter: /usr/local/opt/python/bin/python3.6: no such file or directory

➜  python3
Python 3.7.0 (default, Jun 29 2018, 20:13:13) 
[Clang 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 

Upvotes: 3

Views: 2400

Answers (1)

phd
phd

Reputation: 94932

/usr/local/bin/vex file has this as the first line: #!/usr/local/opt/python/bin/python3.6; it's called shebang and it points operating system to the interpreter to run the script. You've uninstalled python3.6 so OS cannot find said interpreter. You need to reinstall vex with python3.7.

Upvotes: 4

Related Questions