背景
bcolz库是用于管理大型dat文件的一个比较有用的库
在Linux服务器上运行有bcolz的项目报错
ModuleNotFoundError: No module named 'bcolz'
pip install bcolz
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Collecting bcolz
Using cached http://mirrors.aliyun.com/pypi/packages/5c/4e/23942de9d5c0fb16f10335fa83e52b431bcb8c0d4a8419c9ac206268c279/bcolz-1.2.1.tar.gz (1.5 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.7 in /home/user/anaconda3/envs/face/lib/python3.9/site-packages (from bcolz) (1.23.1)
Building wheels for collected packages: bcolz
Building wheel for bcolz (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [176 lines of output]
SSE2 detected
conda install -c anaconda bcolz
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/anaconda/linux-64/current_repodata.json>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
'https://conda.anaconda.org/anaconda/linux-64'
正解
通过在PyPi中搜索bcolz,查到两个模块:
安装第二个最新的模块后,模块导入问题消失。安装命令如下:
pip install bcolz-zipline