配置python環境

2021-07-04 14:29:24 字數 4601 閱讀 4203

2、安裝pip,這裡氣的**,如下

sudo python /users/fishmai/downloads/pip-7.1.0/setup.py install

running install

結果如下

checking .pth file support in /library/python/2.7/site-packages/

/usr/bin/python -e -c pass

running bdist_egg

running egg_info

creating pip.egg-info

writing requirements to pip.egg-info/requires.txt

writing pip.egg-info/pkg-info

writing top-level names to pip.egg-info/top_level.txt

writing dependency_links to pip.egg-info/dependency_links.txt

writing entry points to pip.egg-info/entry_points.txt

writing manifest file 'pip.egg-info/sources.txt'

warning: manifest_maker: standard file 'setup.py' not found

reading manifest file 'pip.egg-info/sources.txt'

writing manifest file 'pip.egg-info/sources.txt'

installing library code to build/bdist.macosx-10.10-intel/egg

running install_lib

warning: install_lib: 'build/lib' does not exist -- no python modules to install

creating build

creating build/bdist.macosx-10.10-intel

creating build/bdist.macosx-10.10-intel/egg

creating build/bdist.macosx-10.10-intel/egg/egg-info

copying pip.egg-info/pkg-info -> build/bdist.macosx-10.10-intel/egg/egg-info

copying pip.egg-info/sources.txt -> build/bdist.macosx-10.10-intel/egg/egg-info

copying pip.egg-info/dependency_links.txt -> build/bdist.macosx-10.10-intel/egg/egg-info

copying pip.egg-info/entry_points.txt -> build/bdist.macosx-10.10-intel/egg/egg-info

copying pip.egg-info/not-zip-safe -> build/bdist.macosx-10.10-intel/egg/egg-info

copying pip.egg-info/requires.txt -> build/bdist.macosx-10.10-intel/egg/egg-info

copying pip.egg-info/top_level.txt -> build/bdist.macosx-10.10-intel/egg/egg-info

creating dist

creating 'dist/pip-7.1.0-py2.7.egg' and adding 'build/bdist.macosx-10.10-intel/egg' to it

removing 'build/bdist.macosx-10.10-intel/egg' (and everything under it)

processing pip-7.1.0-py2.7.egg

removing '/library/python/2.7/site-packages/pip-7.1.0-py2.7.egg' (and everything under it)

creating /library/python/2.7/site-packages/pip-7.1.0-py2.7.egg

extracting pip-7.1.0-py2.7.egg to /library/python/2.7/site-packages

pip 7.1.0 is already the active version in easy-install.pth

installing pip script to /usr/local/bin

installing pip2.7 script to /usr/local/bin

installing pip2 script to /usr/local/bin

installed /library/python/2.7/site-packages/pip-7.1.0-py2.7.egg

processing dependencies for pip==7.1.0

finished processing dependencies for pip==7.1.0

這裡 writing entry points to pip.egg-info/entry_points.txt

writing manifest file 'pip.egg-info/sources.txt'

這兩部神奇般的需要超久的時間

3、安裝xlrd,又是一堆不成功

命令列如下

sudo python -m pip xlrd

沒有什麼問題吧,執行結果如下

/usr/bin/python: no module named pip

fishmaideimac:~ fishmai$ pip

traceback (most recent call last):

file "/usr/local/bin/pip", line 9, in

load_entry_point('pip==7.1.0', 'console_scripts', 'pip')()

file "/system/library/frameworks/python.framework/versions/2.7/extras/lib/python/pkg_resources.py", line 357, in load_entry_point

return get_distribution(dist).load_entry_point(group, name)

file "/system/library/frameworks/python.framework/versions/2.7/extras/lib/python/pkg_resources.py", line 2394, in load_entry_point

return ep.load()

file "/system/library/frameworks/python.framework/versions/2.7/extras/lib/python/pkg_resources.py", line 2108, in load

entry = __import__(self.module_name, globals(),globals(), ['__name__'])

importerror: no module named pip

fishmaideimac:~ fishmai$ pip2

traceback (most recent call last):

file "/usr/local/bin/pip2", line 9, in

load_entry_point('pip==7.1.0', 'console_scripts', 'pip2')()

file "/system/library/frameworks/python.framework/versions/2.7/extras/lib/python/pkg_resources.py", line 357, in load_entry_point

return get_distribution(dist).load_entry_point(group, name)

file "/system/library/frameworks/python.framework/versions/2.7/extras/lib/python/pkg_resources.py", line 2394, in load_entry_point

return ep.load()

file "/system/library/frameworks/python.framework/versions/2.7/extras/lib/python/pkg_resources.py", line 2108, in load

entry = __import__(self.module_name, globals(),globals(), ['__name__'])

importerror: no module named pip

直接暈菜了,還以為是pip模組沒有呢,一直在這裡繞不出來

python 環境配置

轉 七葉樹之技術部落格 預設情況下,在windows下安裝python之後,系統並不會自動新增相應的環境變數。此時不能在命令列直接使用python命令。1.首先需要在系統中註冊python環境變數 假設python的安裝路徑為c python2.6,則修改我的電腦 屬性 高階 環境變數 系統變數中的...

python環境配置

python是解釋型語言,需要安裝直譯器,現在用的最多的是cpython 預設安裝python環境時會自帶cpython直譯器。輸入exit 退出互動模式。命令列模式通過cmd開啟dos視窗,下可以直接執行.py檔案 python test.py print hello,python s 檔名只能是...

Python環境配置

6.安裝完成以後配置cmd訪問路徑 計算機 屬性 高階系統設定 環境變數 系統變數 path 編輯 新增路徑 例 檔案放在e python python 新增 e python python 提取碼 6t85 9.解壓完成之後設定cmd訪問 計算機 屬性 高階系統設定 環境變數 系統變數 path ...