Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>
In Ubuntu, py2 and PY3 coexist
Running virtualenvwrapper will report the following error:
/usr/bin/python: No module named virtualenvwrapper
My virtual env wrapper is actually installed in python3, but not in python2
However, the script of virtualenvwrapper still uses/usr/bin/Python by default. We need to modify it to/usr/bin/Python 3 by default.
in the ~ /. Bashrc file, before source/usr/local/bin/virtualenvwrapper.sh, add:
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
That is to say, the paragraph about virtualenvwrapper.sh is modified as follows:
if [ -f /usr/local/bin/virtualenvwrapper.sh ]; then
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
fi
Similar Posts:
- Enter workon Error: command not found: workon [How to Solve]
- ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or directory
- Using the jupyter notebook (error/usr/bin/python3: no module named ipykernel) on the local browser remote server_ launcher)
- [Linux] CONDA: command not found solution
- After installing torch on Linux, an error is still reported: importerror: no module named torch
- nvm is not compatible with the npm config prefix option:
- Makefile:160: recipe for target ‘all’ failed (Ubuntu 16.06 + Opencv3.2) [Solved]
- How to install “CONDA command not found” in MAC Anaconda
- [Solved] JPype Error: FileNotFoundError: [Errno 2] No such file or directory: ‘/usr/lib/jvm’
- Linux: How to configurate Environment Variables