cell2location報錯

安裝鏈接如下:

Installation of pymc3 version with GPU support — cell2location documentation
使用下面這個方案安裝到一半 開始報錯

image.png
  Using cached scikit_misc-0.5.2.tar.gz (298 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'error'

Pip subprocess error:
  error: subprocess-exited-with-error

  × installing build dependencies for scikit-misc did not run successfully.
  │ exit code: 1
  ╰─> [52 lines of output]
      Collecting meson-python>=0.15.0
        Using cached meson_python-0.18.0-py3-none-any.whl.metadata (2.8 kB)
      Collecting Cython>=3.0.8
        Using cached cython-3.2.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_                                                                                                                                                         17_x86_64.manylinux_2_28_x86_64.whl.metadata (4.5 kB)
      Collecting setuptools
        Using cached setuptools-80.9.0-py3-none-any.whl.metadata (6.6 kB)
      Collecting wheel
        Using cached wheel-0.45.1-py3-none-any.whl.metadata (2.3 kB)
      Collecting numpy>=2.0
        Using cached numpy-2.3.5.tar.gz (20.6 MB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Installing backend dependencies: started
        Installing backend dependencies: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error

        × Preparing metadata (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [19 lines of output]
            + /cluster/home/gaoli/miniconda3/envs/cell2loc_env/bin/python /tmp/                                                                                                                                                         pip-install-8m0nlhgg/numpy_ea251ddb410a442e815574f4bea75f0a/vendored-meson/meso                                                                                                                                                         n/meson.py setup /tmp/pip-install-8m0nlhgg/numpy_ea251ddb410a442e815574f4bea75f                                                                                                                                                         0a /tmp/pip-install-8m0nlhgg/numpy_ea251ddb410a442e815574f4bea75f0a/.mesonpy-zg                                                                                                                                                         2o5yrx -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/tm                                                                                                                                                         p/pip-install-8m0nlhgg/numpy_ea251ddb410a442e815574f4bea75f0a/.mesonpy-zg2o5yrx                                                                                                                                                         /meson-python-native-file.ini
            The Meson build system
            Version: 1.8.3
            Source dir: /tmp/pip-install-8m0nlhgg/numpy_ea251ddb410a442e815574f                                                                                                                                                         4bea75f0a
            Build dir: /tmp/pip-install-8m0nlhgg/numpy_ea251ddb410a442e815574f4                                                                                                                                                         bea75f0a/.mesonpy-zg2o5yrx
            Build type: native build
            Project name: NumPy
            Project version: 2.3.5
            C compiler for the host machine: cc (gcc 4.8.5 "cc (GCC) 4.8.5 2015                                                                                                                                                         0623 (Red Hat 4.8.5-39)")
            C linker for the host machine: cc ld.bfd 2.27-41
            C++ compiler for the host machine: c++ (gcc 4.8.5 "c++ (GCC) 4.8.5                                                                                                                                                          20150623 (Red Hat 4.8.5-39)")
            C++ linker for the host machine: c++ ld.bfd 2.27-41
            Cython compiler for the host machine: cython (cython 3.2.3)
            Host machine cpu family: x86_64
            Host machine cpu: x86_64

            ../meson.build:28:4: ERROR: Problem encountered: NumPy requires GCC                                                                                                                                                          >= 9.3

            A full log can be found at /tmp/pip-install-8m0nlhgg/numpy_ea251ddb                                                                                                                                                         410a442e815574f4bea75f0a/.mesonpy-zg2o5yrx/meson-logs/meson-log.txt
            [end of output]

        note: This error originates from a subprocess, and is likely not a prob                                                                                                                                                         lem with pip.
      error: metadata-generation-failed

      × Encountered error while generating package metadata.
      ╰─> numpy

      note: This is an issue with the package mentioned above, not pip.
      hint: See above for details.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem wi                                                                                                                                                         th pip.
ERROR: Failed to build 'scikit-misc' when installing build dependencies for sci                                                                                                                                                         kit-misc
                                                                             fa                                                                                                                                                         iled

CondaEnvException: Pip failed

顯示是gcc版本不夠 導致的 numpy版本裝不上

然后
which gcc /usr/bin/gccgcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

然后使用conda安裝一個gcc 替換掉這個環(huán)境中g(shù)cc
使用了

conda install gcc_linux-64=9.* gxx_linux-64=9.*
然后成功安裝

使用下面的代碼去替換環(huán)境

export PATH="${path}/miniconda3/envs/cell2loc_env/bin:$PATH"

以及

export CC={path}/miniconda3/envs/cell2loc_env/bin/x86_64-conda-linux-gnu-gcc
export CXX={path}miniconda3/envs/cell2loc_env/bin/x86_64-conda-linux-gnu-g++

然后發(fā)現(xiàn)gcc還是剛才那個 就是沒有用
所以檢察一下環(huán)境中
ls ${path}/miniconda3/envs/cell2loc_env/bin/x86_64*
是下載好了的
是有x86_64-conda-linux-gnu-gcc的
但是沒有直接的gcc

后面是進入到
~/miniconda3/envs/cell2loc_env/bin
這個文件夾中

ln -sf x86_64-conda-linux-gnu-gcc gcc
ln -sf x86_64-conda-linux-gnu-g++ g++
建立軟連接后
然后which gcc就修改為使用conda環(huán)境下的了

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容