Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python virtualenvwrapper bad interpreter

Tags:

python

I recently upgrade from python 3.5 to python 3.6 (with brew on macOS). However virtualenvwrapper now seems to be broken and I get the error. A reinstall didn't help unfortunately.

mkvirtualenv:78: /usr/local/bin/virtualenv: bad interpreter: /usr/local/opt/python3/bin/python3.5: no such file or directory

I have VIRTUALENV_PYTHON=python3 set so the default is to install a virtualenv with python3.

like image 270
Yunti Avatar asked Jul 23 '17 21:07

Yunti


People also ask

What is virtualenvwrapper in Python?

virtualenvwrapper is a set of extensions to Ian Bicking's virtualenv tool. The extensions include wrappers for creating and deleting virtual environments and otherwise managing your development workflow, making it easier to work on more than one project at a time without introducing conflicts in their dependencies.

What does virtualenvwrapper win do?

The idea behind virtualenvwrapper is to ease usage of Ian Bicking's virtualenv, a tool for creating isolated Python virtual environments, each with their own libraries and site-packages. These scripts should work on any version of Windows (Windows XP, Windows Vista, Windows 7/8/10).


1 Answers

  1. open the terminal use which python3.6 to show the path of python3.6
  2. open the file /usr/local/bin/virtualenv
  3. change the first line which starts with #! with the path of python3.6 before
like image 176
user8731255 Avatar answered Oct 25 '22 17:10

user8731255