我在安装Python 3中的包时遇到了麻烦。
我总是用setup.py install安装包。但是现在,当我尝试安装anicolors包时,我得到:
importerror "No Module named Setuptools"
我不知道该怎么做,因为我过去没有安装安装工具。尽管如此,我仍然能够使用setup.py install安装许多包,而不需要setuptools。为什么我现在要安装工具?
我甚至不能安装setuptools,因为我有Python 3.3和setuptools不支持Python 3。
为什么我的安装命令不再工作了?
PyPA推荐的用于安装和管理Python包的工具是pip。pip包含在Python 3.4 (PEP 453)中,但对于旧版本,这里是如何安装它(在Windows上):
下载https://bootstrap.pypa.io/get-pip.py
>c:\Python33\python.exe get-pip.py
Downloading/unpacking pip
Downloading/unpacking setuptools
Installing collected packages: pip, setuptools
Successfully installed pip setuptools
Cleaning up...
>c:\Python33\Scripts\pip.exe install pymysql
Downloading/unpacking pymysql
Installing collected packages: pymysql
Successfully installed pymysql
Cleaning up...
PyPA推荐的用于安装和管理Python包的工具是pip。pip包含在Python 3.4 (PEP 453)中,但对于旧版本,这里是如何安装它(在Windows上):
下载https://bootstrap.pypa.io/get-pip.py
>c:\Python33\python.exe get-pip.py
Downloading/unpacking pip
Downloading/unpacking setuptools
Installing collected packages: pip, setuptools
Successfully installed pip setuptools
Cleaning up...
>c:\Python33\Scripts\pip.exe install pymysql
Downloading/unpacking pymysql
Installing collected packages: pymysql
Successfully installed pymysql
Cleaning up...