这个包是celldex的依赖项,而celldex则是singler的配套参考数据包。所以我们安装celldex就会自动安装他。
省流提示:解决问题最终成功的尝试是2.3,其他步骤不需要操作了。但可以从中学习一下都有啥可以干的,毕竟谁也没有上帝视角,不知道哪个尝试会有效嘛。
希望你看到这些报错和尝试不要害怕,产生畏难情绪,其实难度都在我这里,展示这个过程是为了做记录,学方法。以后有不是我教的内容,才会需要自己配置环境的,如果是我教的,我会负责。
Wheel 是 Python 的一种预编译包格式,文件扩展名为 .whl。它是 Python 打包机制的一个重要组成部分,可以看作是一个"ready-to-install"(即开即用)的包格式。
正常情况下pip install 会自动完成编译的工作,但这次遇到了报错。
error: command '/tmp/pip-build-env-upbakww0/overlay/bin/cmake' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for dolomite_base
Failed to build dolomite_base
ERROR: Failed to build installable wheels for some pyproject.toml based projects (dolomite_base)
估计是ubuntu缺什么零件。pip install -v 可以显示详细日志,便于排查问题,报错如下:
cmake -S lib -B build/temp.linux-x86_64-cpython-311 -Dpybind11_DIR=/tmp/pip-build-env-asv1jvd9/overlay/lib/python3.11/site-packages/pybind11/share/cmake/pybind11 -DPYTHON_EXECUTABLE=/home/bio02/miniconda3/envs/sc3/bin/python3.11 -DCMAKE_BUILD_TYPE=Release -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-8pmbmqc6/dolomite-base_ed6d850d5123490f96c1ae0aa089c8fa/build/lib.linux-x86_64-cpython-311/dolomite_base
-- The CXX compiler identification is GNU 9.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
-- Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS C CXX)
-- Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS C CXX)
[ 11%] Creating directories for 'chihaya-populate'
[ 22%] Performing download step (git clone) for 'chihaya-populate'
Cloning into 'chihaya-src'...
fatal: unable to access 'https://github.com/ArtifactDB/chihaya/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.
Cloning into 'chihaya-src'...
error: RPC failed; curl 56 GnuTLS recv error (-110): The TLS connection was non-properly terminated.
fatal: the remote end hung up unexpectedly
Cloning into 'chihaya-src'...
fatal: unable to access 'https://github.com/ArtifactDB/chihaya/': Failed to connect to github.com port 443: Connection timed out
Had to git clone more than once: 3 times.
CMake Error at chihaya-subbuild/chihaya-populate-prefix/tmp/chihaya-populate-gitclone.cmake:50 (message):
Failed to clone repository: 'https://github.com/ArtifactDB/chihaya'
make[2]: *** [CMakeFiles/chihaya-populate.dir/build.make:102: chihaya-populate-prefix/src/chihaya-populate-stamp/chihaya-populate-download] Error 1
make[1]: *** [CMakeFiles/Makefile2:87: CMakeFiles/chihaya-populate.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
CMake Error at /tmp/pip-build-env-asv1jvd9/overlay/lib/python3.11/site-packages/cmake/data/share/cmake-3.31/Modules/FetchContent.cmake:1918 (message):
Build step for chihaya failed: 2
Call Stack (most recent call first):
/tmp/pip-build-env-asv1jvd9/overlay/lib/python3.11/site-packages/cmake/data/share/cmake-3.31/Modules/FetchContent.cmake:1609 (__FetchContent_populateSubbuild)
/tmp/pip-build-env-asv1jvd9/overlay/lib/python3.11/site-packages/cmake/data/share/cmake-3.31/Modules/FetchContent.cmake:2145:EVAL:2 (__FetchContent_doPopulation)
/tmp/pip-build-env-asv1jvd9/overlay/lib/python3.11/site-packages/cmake/data/share/cmake-3.31/Modules/FetchContent.cmake:2145 (cmake_language)
/tmp/pip-build-env-asv1jvd9/overlay/lib/python3.11/site-packages/cmake/data/share/cmake-3.31/Modules/FetchContent.cmake:2384 (__FetchContent_Populate)
/tmp/pip-install-8pmbmqc6/dolomite-base_ed6d850d5123490f96c1ae0aa089c8fa/build/temp.linux-x86_64-cpython-311/_deps/takane-src/extern/CMakeLists.txt:23 (FetchContent_MakeAvailable)
-- Configuring incomplete, errors occurred!
An error occurred while building the project, please ensure you have the most updated version of setuptools, setuptools_scm and wheel with:
pip install -U setuptools setuptools_scm wheel
error: command '/tmp/pip-build-env-asv1jvd9/overlay/bin/cmake' failed with exit code 1
error: subprocess-exited-with-error
× Building wheel for dolomite_base (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /home/bio02/miniconda3/envs/sc3/bin/python3.11 /home/bio02/miniconda3/envs/sc3/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmplhya7b20
cwd: /tmp/pip-install-8pmbmqc6/dolomite-base_ed6d850d5123490f96c1ae0aa089c8fa
Building wheel for dolomite_base (pyproject.toml) ... error
ERROR: Failed building wheel for dolomite_base
Failed to build dolomite_base
ERROR: Failed to build installable wheels for some pyproject.toml based projects (dolomite_base)
其实两大段的关键词都是ERROR: Failed building wheel for dolomite_base,编译失败!
pip页面会提供预编译版本的whl文件,直接使用即可跳过编译的步骤
文件名中包括了python版本和设备的平台。其中ubuntu适用的是manyliux,适用mac的是macos。
遇到3个问题:
dolomite_base-0.4.2-cp311-cp311-manylinux_1_2_x86_64.whl is not a supported wheel on this platform.ubuntu
解决办法:下载manylinux版本,改文件名,去掉平台名字,加上none-any即可安装!
改名字,真是一个看起来不咋地但有效的行为!
https://blog.csdn.net/yuangan1529/article/details/116696624
改为: dolomite_base-0.4.2-cp311-none-any.whl就可以安装了
conda list能列出来了,但是import报错!
说编译时使用的glibc版本为2.32,但我的ubuntu最多只能更新到2.31,要求二者一致,因此能安装但import就会报错
/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/bio02/miniconda3/envs/sc2/lib/python3.11/site-packages/dolomite_base/lib_dolomite_base.cpython-311-x86_64-linux-gnu.so)
检查glibc版本的办法是:
ldd --version
试图更新glibc,发现最新只能到2.31
sudo apt-get install libc6-dev
eading package lists... Done
Building dependency tree
Reading state information... Done
libc6-dev is already the newest version (2.31-0ubuntu9.17).
libc6-dev set to manually installed.
The following packages were automatically installed and are no longer required:
libfwupdplugin1 libxmlb1
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
给我整愣住了。不能升级自己电脑上的glibc,那我使用whl的上一个版本吧。
python -c 'import dolomite_base'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/bio02/miniconda3/envs/sc2/lib/python3.11/site-packages/dolomite_base/__init__.py", line 18, in <module>
from .save_object import save_object, validate_saves
File "/home/bio02/miniconda3/envs/sc2/lib/python3.11/site-packages/dolomite_base/save_object.py", line 3, in <module>
from .validate_object import validate_object
File "/home/bio02/miniconda3/envs/sc2/lib/python3.11/site-packages/dolomite_base/validate_object.py", line 3, in <module>
from . import lib_dolomite_base as lib
ImportError: cannot import name 'lib_dolomite_base' from partially initialized module 'dolomite_base' (most likely due to a circular import) (/home/bio02/miniconda3/envs/sc2/lib/python3.11/site-packages/dolomite_base/__init__.py)
原本想去改miniconda库里的文件,但报错没有权限修改,如果要改其实也可以,就是先chord设置一下权限再改。
但我选择了更安全的方式--whl本质是zip压缩包,所以用7-zip解压,改完代码然后重新压缩,选择压缩类型为zip,命名时后缀写whl,即可正常安装和使用。
按照ai提示修改了两处源代码,解决了其循环导入的问题。
通过网盘分享的文件:dolomite_base-0.4.2-cp311-none-any.whl
链接: https://pan.baidu.com/s/1Asaveg9mP1xz9IroZTJDSA?pwd=883m 提取码: 883m
--来自百度网盘超级会员v5的分享
下载此文件放在工作目录下
conda activate sc2
pip install dolomite_base-0.4.2-cp311-none-any.whl
然后再继续装celldex等,就没有问题了。
还有各种无用尝试,花了三四个小时。真是个难缠的bug
但发现,即使已经有了dolomite旧版本,celldex安装时还是会更新他,因为celldex没有指定要求什么版本的dolomite_base,就默认安装最新版!
解决办法是把这两个包的版本都指定好再安装。
pip install celldex==0.1.1 dolomite_base==0.4.0
但又有新问题,dolomite_base有好几个同系列的包,全体依赖最新版的dolomite_base!所以要退大家一起退吧!
尝试发现,一起退也不行,指定的太多了,其他的包无法解决环境冲突了!我去,流氓软件全家桶!
冲突的表现是有报错,而且运行jupyternotebook里原本调好了的代码会:
cannot import name 'TatamiNumericPointer' from 'mattress' (/home/bio02/miniconda3/envs/sc2/lib/python3.11/site-packages/mattress/__init__.py)
跟着ai的提示去装和更新各种编译工具
企图用源码方式装新版的GLIBC2.32,那一大堆报错,我都不知道该咋问,中途放弃。
cmake版本更新成功,但报错信息无任何变化,说明更新了没有用
sudo apt-get update
sudo apt-get install -y software-properties-common lsb-release wget
sudo apt-get remove --purge cmake
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc | sudo apt-key add -
sudo apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main"
sudo apt-get update
sudo apt-get install cmake
gcc 和g++更新,也没有用
sudo apt-get update
sudo apt-get install -y gcc-11 g++-11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100
方法是从github页面上下载zip,然后解压并cd进去,pip .即可,但是遇到新的问题
说是setuptools-scm无法自动检测版本。AI 提示修改源码,越改问题越多,遂放弃。
pip install .
Looking in indexes: https://pypi.mirrors.ustc.edu.cn/simple/
Processing /mnt/c/Users/win10/Desktop/python250208/day7.8/dolomite-base-master
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [46 lines of output]
An error occurred while building the project, please ensure you have the most updated version of setuptools, setuptools_scm and wheel with:
pip install -U setuptools setuptools_scm wheel
Traceback (most recent call last):
File "/home/bio02/miniconda3/envs/sc2/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
main()
File "/home/bio02/miniconda3/envs/sc2/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bio02/miniconda3/envs/sc2/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-3tljex4b/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-3tljex4b/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-3tljex4b/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 320, in run_setup
exec(code, locals())
File "<string>", line 62, in <module>
File "/tmp/pip-build-env-3tljex4b/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 117, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-3tljex4b/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 148, in setup
_setup_distribution = dist = klass(attrs)
^^^^^^^^^^^^
File "/tmp/pip-build-env-3tljex4b/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 319, in __init__
_Distribution.__init__(self, dist_attrs)
File "/tmp/pip-build-env-3tljex4b/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 290, in __init__
self.finalize_options()
File "/tmp/pip-build-env-3tljex4b/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 681, in finalize_options
ep(self)
File "/tmp/pip-build-env-3tljex4b/overlay/lib/python3.11/site-packages/setuptools_scm/_integration/setuptools.py", line 123, in infer_version
_assign_version(dist, config)
File "/tmp/pip-build-env-3tljex4b/overlay/lib/python3.11/site-packages/setuptools_scm/_integration/setuptools.py", line 58, in _assign_version
_version_missing(config)
File "/tmp/pip-build-env-3tljex4b/overlay/lib/python3.11/site-packages/setuptools_scm/_get_version_impl.py", line 117, in _version_missing
raise LookupError(
LookupError: setuptools-scm was unable to detect version for /mnt/c/Users/win10/Desktop/python250208/day7.8/dolomite-base-master.
Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
-- Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS C CXX)
-- Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS C CXX)
查看电脑上是否有hdf5及其开发头文件
dpkg -l | grep hdf5
如果已经安装了 HDF5 和开发包,应该能看到类似以下输出:
ii libhdf5-103:amd64 1.10.4+repack-10ubuntu1 amd64 Hierarchical Data Format 5 (HDF5) - runtime files
ii libhdf5-dev 1.10.4+repack-10ubuntu1 amd64 Hierarchical Data Format 5 (HDF5) - development files
如果未安装,就不会输出任何内容。可以通过以下命令安装:
sudo apt-get install libhdf5-dev
[ 11%] Creating directories for 'chihaya-populate'
[ 22%] Performing download step (git clone) for 'chihaya-populate'
Cloning into 'chihaya-src'...
fatal: unable to access 'https://github.com/ArtifactDB/chihaya/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.
Cloning into 'chihaya-src'...
error: RPC failed; curl 56 GnuTLS recv error (-110): The TLS connection was non-properly terminated.
fatal: the remote end hung up unexpectedly
Cloning into 'chihaya-src'...
fatal: unable to access 'https://github.com/ArtifactDB/chihaya/': Failed to connect to github.com port 443: Connection timed out
Had to git clone more than once: 3 times.
CMake Error at chihaya-subbuild/chihaya-populate-prefix/tmp/chihaya-populate-gitclone.cmake:50 (message):
Failed to clone repository: 'https://github.com/ArtifactDB/chihaya'
报错信息显示,CMake 使用 FetchContent 模块从 GitHub 克隆依赖库 chihaya 时失败,具体错误如下:
● TLS 连接未正确终止 (GnuTLS recv error (-110) 或 curl 56 GnuTLS recv error (-110))。
● 连接超时 (Failed to connect to github.com port 443: Connection timed out)。
这通常与网络连接或 Git 配置有关。
git clone
:cmake ..
cmake --build .
但。。。说了石沉大海嘛。没有效果。
啊呦我去。。。就啥事没有啊!那就用八字不合来解释吧。
https://www.piwheels.org/project/dolomite-base/
上面显示全部编译失败