python3.x - python多版本共存时,默认easy_install,yum install都安装python2的库了,怎么解决这个问题?
阿神
阿神 2017-04-17 16:54:46
0
7
500

希望能安装python3的库,但是python2 link 到了/usr/bin/python,python3 link 到了/usr/bin/python3

阿神
阿神

闭关修行中......

reply all(7)
小葫芦

http://www.nowamagic.net/academy/detail/1330228
python virtualenv

阿神

Please use pip3

Peter_Zhu

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

大家讲道理

Use absolute paths

伊谢尔伦

For multi-version coexistence, you can use virtualenv to create a virtual running environment and install the python3 library in the virtual environment.

阿神

All python scripts are run through virtualenv. Develop the habit of one project and one environment

巴扎黑

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!