简体   繁体   English

easy_install是否与python2和python3不同?

[英]easy_install is different for python2 and python3 or not?

I had installed easy_install using sudo apt-get install python-setuptools . 我已经使用sudo apt-get install python-setuptools安装了easy_install。 Will it install easy_install for python2 or python3? 它将为python2或python3安装easy_install吗?
I want to install virtualenv using sudo easy_install virtualenv . 我想安装virtualenv使用sudo easy_install virtualenv So, will virtualenv python interpreter will depends on easy_install python interpreter ? 那么,virtualenv python解释器将依赖于easy_install python解释器吗? Or I can run virtualenv for any python interpreter ? 或者我可以为任何python解释器运行virtualenv?

sudo apt-get install python-setuptools

installs setuptools for Python 2. For Python 3 the command is 为Python 2安装setuptools 。对于Python 3,命令为

sudo apt-get install python3-setuptools

As for virtualenv — you can install it for one Python but use with any: 至于virtualenv —您可以为一个Python安装它,但可以与以下任何一个一起使用:

virtualenv --python python3.4

even if virtualenv is for Python 2.7 or 3.6. 即使virtualenv适用于Python 2.7或3.6。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM