python-setuptools 與pip安裝的setuptools只能有乙個,如果有兩個,預設使用系統安裝的,所以你在用pip裝軟體的
時候,很容易出現
/usr/lib/python2.7/distutils/dist.py:267: userwarning: unknown distribution option: 'entry_points'
warnings.warn(msg)
/usr/lib/python2.7/distutils/dist.py:267: userwarning: unknown distribution option: 'install_requires'
warnings.warn(msg)
/usr/lib/python2.7/distutils/dist.py:267: userwarning: unknown distribution option: 'tests_require'
這個google出來是setup版本不對,所以要公升級setuptools,但是如果有系統裝了python-setuptools, 再使用pip install setuptools
這樣安裝是不起作用的,需要先apt-get remove python-setuptools
因為in [1]: import sys
in [2]: sys.path
out[2]:
['',
'/usr/local/bin',
'/vagrant_data',
'/usr/local/lib/python2.7/dist-packages/amqp-1.4.6-py2.7.egg',
'/usr/lib/python2.7/dist-packages',
'/usr/local/lib/python2.7/dist-packages/pbr-0.10.0-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/tox-1.8.1-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/virtualenv-1.11.6-py2.7.egg',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/pymodules/python2.7',
'/usr/local/lib/python2.7/dist-packages/ipython/extensions',
'/root/.ipython']
in [3]: exit
root@test:/home/vagrant/download/tox-1.8.1# pip show setuptools
---name: setuptools
version: 7.0
location: /usr/local/lib/python2.7/dist-packages
requires:
pip 裝的包是在/usr/local/lib下,而系統裝的是在 /usr/lib 下,系統裝的包優先級別高,所有就算你裝了,也不起作用, 所以等於說你機子上的
setuptools還是沒有公升級。 因此你需要先apt-get remove python-setuptools 然後再pip install setuptools.
pip安裝第三方庫排錯
安裝python3.6 pip3.6 yum install python36 python36 devel python36 pip pip3.6 基本命令 pip list 檢視已經安裝的第三方庫 軟體 檢視安裝 pip show 庫名 軟體 trusted host url 如果使用的是非ht...
sentry安裝排錯記錄
root uname a linux iz2ze7ki6m0w5zsxd5kc4jz 3.10.0 862.6.3.el7.x86 64 1 smp tue jun 26 16 32 21 utc 2018 x86 64 x86 64 x86 64 gnu linux root lsb releas...
python 安裝pip 命令 pip 安裝命令
pip官網文件 若沒有將c python27 scripts加入到path環境變數,可以在c python27 scripts目錄下執行pip命令。常用命令 1.列出已安裝的package c python27 scripts pip list pil 1.1.7 pip 1.5.6 py2exe ...