希望能安装python3的库,但是python2 link 到了/usr/bin/python,python3 link 到了/usr/bin/python3
天蓬老师2017-04-17 16:56:46
If you need to coexist with multiple versions of Python, it is recommended to use pyenv https://github.com/yyuu/pyenv
Or run your command with absolute path
~/.pyenv/versions/2.6.9/bin/pip install tornado
This code installs tornado into the python directory of version 2.6.9
伊谢尔伦2017-04-17 16:56:46
For multi-version coexistence, you can use virtualenv to create a virtual running environment and install the python3 library in the virtual environment.
阿神2017-04-17 16:56:46
All python scripts are run through virtualenv. Develop the habit of one project and one environment
巴扎黑2017-04-17 16:56:46
If you are in a Linux environment, you can use pyenv to switch versions. You can refer to this article to try:
Python multi-version coexistence tool-Configuration of Pyenv and Anaconda scientific computing environment