pip install時報錯問題

2021-08-19 18:16:00 字數 1192 閱讀 8479

使用pip安裝requests包時,發生報錯,起初以為是防火牆的問題,結果發現是python中配置檔案的問題。

報錯內容如下:

/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 129, in prep_for_dist self.req_to_install.run_egg_info() file "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 412, in run_egg_info self.setup_py, self.name, file "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 387, in setup_py import setuptools # noqa file "/root/.local/lib/python2.7/site-packages/setuptools/

init

.py", line 12, in import setuptools.version file "/root/.local/lib/python2.7/site-packages/setuptools/version.py", line 1, in import pkg_resources file "/root/.local/lib/python2.7/site-packages/pkg_resources/

init

.py", line 72, in import packaging.requirements file "/root/.local/lib/python2.7/site-packages/packaging/requirements.py", line 59, in marker_expr = originaltextfor(marker_expr())("marker") typeerror: 

call

() takes exactly 2 arguments (1 given)

解決辦法:

在/usr/lib/python2.7目錄下找到requirements.py

將marker_expr = originaltextfor(marker_expr())("marker")替換成marker_expr = originaltextfor(marker_expr)("marker")即可。

linq連線(Union)時報錯問題處理

returndata data.select p p union datasjmin.select p p union datasjmax.select p p union dataycmin.select p p union dataycmax.select p p union datajgmin...

編譯uboot時報錯

編譯u boot時出現 configuring for smdk6400 board ln 正在建立指向 arch arm include asm 的符號鏈結 asm 不支援的操作 make xx config 錯誤 1 然後再執行 make config的時候出現 could not find l...

安裝 Homebrew時報錯

在安裝homebrew執行命令 bin bash c curl fssl 此時爆出乙個錯誤 curl 7 failed to connect to raw.githubusercontent.com port 443 connection refused 該問題由於網域名稱解析出問題,換成ip即可 ...