日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 综合教程 >内容正文

综合教程

pip离线安装Bottleneck报Error解决

發(fā)布時(shí)間:2023/12/13 综合教程 27 生活家
生活随笔 收集整理的這篇文章主要介紹了 pip离线安装Bottleneck报Error解决 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

1. 前言

操作系統(tǒng):centos7.2

python版本:3.7

pip版本:20.2.4

公司一個(gè)AI項(xiàng)目需要部署,但是客戶的服務(wù)器環(huán)境是在內(nèi)網(wǎng),無(wú)法聯(lián)網(wǎng)更新,于是在公司開(kāi)發(fā)服創(chuàng)建了一個(gè)同樣的環(huán)境,離線下載安裝包后再進(jìn)行安裝,關(guān)于離線安裝可以參考:python使用pip離線安裝庫(kù)

因?yàn)槭褂昧艘粋€(gè)叫fastai的庫(kù),需要依賴Bottleneck,然后這個(gè)包就真的成為我的bottleneck了。

因?yàn)閼岩墒乔懊嬉蕾噯?wèn)題,于是將numpy之類的依賴安裝后,再單獨(dú)安裝Bottleneck,安裝命令:

pip install Bottleneck-1.3.2.tar.gz

報(bào)錯(cuò):

Processing ./Bottleneck-1.3.2.tar.gz
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/python3/bin/python3.7 /usr/local/python3/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-1g2lyacs/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'numpy==1.13.3; python_version=='"'"'2.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.13.3; python_version=='"'"'3.5'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.13.3; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.14.5; python_version=='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'2.7'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.5'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.6'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"' and platform_system=='"'"'AIX'"'"''
cwd: None
Complete output (16 lines):
Ignoring numpy: markers 'python_version == "2.7" and platform_system != "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.5" and platform_system != "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.6" and platform_system != "AIX"' don't match your environment
Ignoring numpy: markers 'python_version >= "3.8" and platform_system != "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "2.7" and platform_system == "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.5" and platform_system == "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.6" and platform_system == "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.7" and platform_system == "AIX"' don't match your environment
Ignoring numpy: markers 'python_version >= "3.8" and platform_system == "AIX"' don't match your environment
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fcfa878e3c8>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fcfa6008e48>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fcfa6008358>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fcfa6008780>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fcfa6008048>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
ERROR: Could not find a version that satisfies the requirement setuptools (from versions: none)
ERROR: No matching distribution found for setuptools
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/python3/bin/python3.7 /usr/local/python3/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-1g2lyacs/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'numpy==1.13.3; python_version=='"'"'2.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.13.3; python_version=='"'"'3.5'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.13.3; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.14.5; python_version=='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'2.7'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.5'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.6'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"' and platform_system=='"'"'AIX'"'"'' Check the logs for full command output.

將numpy降為里面要求的1.16.0版本,依舊無(wú)法通過(guò)。

按照官網(wǎng)的教程:https://pypi.org/project/Bottleneck/,解壓后在文件夾中進(jìn)行安裝:

pip install .

依舊報(bào)一樣的問(wèn)題。

2. 解決

用google上查到的大多說(shuō)是項(xiàng)目本身的bug,pip無(wú)能為力之類的,所以只能從編譯項(xiàng)目的角度去解決。

通過(guò)閱讀解壓后的文件,我在一個(gè)叫versioneer.py的文件中找到了下面這段話:

Versioneer will look for `.git` in parent directories, and most operations

should get the right version string. However `pip` and `setuptools` have bugs

and implementation details which frequently cause `pip install .` from a

subproject directory to fail to find a correct version string (so it usually

defaults to `0+unknown`).

`pip install --editable .` should work correctly. `setup.py install` might

work too.

Pip-8.1.1 is known to have this problem, but hopefully it will get fixed in

some later version.

嘗試:

pip install --editable

依舊有錯(cuò)。

繼續(xù)嘗試:

python setup.py install

沒(méi)想到就可以了,安裝完成后沒(méi)有報(bào)錯(cuò),使用

pip list | grep Bottle

顯示:

Bottleneck 1.3.2

安裝成功。

3. 參考

無(wú)

(完)

總結(jié)

以上是生活随笔為你收集整理的pip离线安装Bottleneck报Error解决的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。