cell2location复现

发布于:2025-07-17 ⋅ 阅读:(16) ⋅ 点赞:(0)

https://github.com/BayraktarLab/cell2location/issues/348

根据你已下载的本地 wheel 文件,可以通过以下方式修改安装命令,优先从本地路径安装 jaxlib,同时保持其他依赖的安装方式不变:

解决方案

# 安装 jax (从远程 PyPI 源)
pip install --upgrade jax==0.4.14

# 安装 jaxlib (从本地 wheel 文件)
pip install --no-index --find-links=/mnt/data/test1/repo/package_cuda12/ jaxlib==0.4.14+cuda12.cudnn89

# 验证安装
python -c "import jax; print(jax.__version__); print(jax.devices())"

参数说明

  • --no-index:禁止从 PyPI 索引下载包,强制使用本地文件
  • --find-links=/path/to/wheels:指定本地 wheel 文件的搜索路径

替代方案(单命令)

如果你希望将命令合并为一行,可以使用以下语法:

pip install --upgrade jax==0.4.14 \
  /mnt/data/test1/repo/package_cuda12/jaxlib-0.4.14+cuda12.cudnn89-cp311-cp311-manylinux2014_x86_64.whl

https://storage.googleapis.com/jax-releases/jax_cuda_releases.html

注意事项

  1. Python 版本匹配:确保你的 Python 版本是 3.11(与 wheel 文件的 cp311 后缀一致)
  2. CUDA 环境:本地系统需要安装 CUDA 12 和 CuDNN 8.9,否则 jaxlib 可能无法正常工作
  3. 依赖顺序:先安装 jax,再安装 jaxlib,避免版本冲突

如果遇到其他依赖问题,可以使用 pip install --no-deps 跳过依赖检查,但这可能导致运行时错误。

pip freeze > requirements.txt

(cell2loc_test) test1@capios:/mnt/data/test1$ pip list
Package Version


absl-py 2.3.1
aiohappyeyeballs 2.6.1
aiohttp 3.12.14
aiosignal 1.4.0
anndata 0.11.4
annotated-types 0.7.0
anyio 4.9.0
array-api-compat 1.12.0
arrow 1.3.0
async-timeout 5.0.1
attrs 25.3.0
backoff 2.2.1
beautifulsoup4 4.13.4
blessed 1.21.0
boto3 1.39.6
botocore 1.39.6
cell2location 0.1.4
certifi 2025.7.14
charset-normalizer 3.4.2
chex 0.1.7
click 8.2.1
contourpy 1.3.2
croniter 1.4.1
cycler 0.12.1
dateutils 0.6.12
deepdiff 7.0.1
dm-tree 0.1.9
docrep 0.3.2
editor 1.6.6
etils 1.13.0
exceptiongroup 1.3.0
fastapi 0.116.1
filelock 3.18.0
flax 0.7.4
fonttools 4.58.5
frozenlist 1.7.0
fsspec 2024.12.0
grpcio 1.73.1
h11 0.16.0
h5py 3.14.0
humanize 4.12.3
idna 3.10
importlib_resources 6.5.2
inquirer 3.4.0
itsdangerous 2.2.0
jax 0.4.23
jaxlib 0.4.23
Jinja2 3.1.6
jmespath 1.0.1
joblib 1.5.1
kiwisolver 1.4.8
legacy-api-wrap 1.4.1
lightning 2.0.9.post0
lightning-cloud 0.5.70
lightning-utilities 0.14.3
llvmlite 0.44.0
Markdown 3.8.2
markdown-it-py 3.0.0
MarkupSafe 3.0.2
matplotlib 3.10.3
mdurl 0.1.2
ml_collections 1.1.0
ml_dtypes 0.5.1
mpmath 1.3.0
msgpack 1.1.1
mudata 0.3.2
multidict 6.6.3
multipledispatch 1.0.0
natsort 8.4.0
nest-asyncio 1.6.0
networkx 3.4.2
numba 0.61.2
numpy 1.26.4
numpyro 0.13.2
nvidia-cublas-cu12 12.6.4.1
nvidia-cuda-cupti-cu12 12.6.80
nvidia-cuda-nvrtc-cu12 12.6.77
nvidia-cuda-runtime-cu12 12.6.77
nvidia-cudnn-cu12 9.5.1.17
nvidia-cufft-cu12 11.3.0.4
nvidia-cufile-cu12 1.11.1.6
nvidia-curand-cu12 10.3.7.77
nvidia-cusolver-cu12 11.7.1.2
nvidia-cusparse-cu12 12.5.4.2
nvidia-cusparselt-cu12 0.6.3
nvidia-nccl-cu12 2.26.2
nvidia-nvjitlink-cu12 12.6.85
nvidia-nvtx-cu12 12.6.77
opencv-python 4.8.1.78
opt_einsum 3.4.0
optax 0.2.1
orbax-checkpoint 0.4.1
ordered-set 4.1.0
packaging 24.2
pandas 2.3.1
patsy 1.0.1
pillow 11.3.0
pip 25.1
propcache 0.3.2
protobuf 6.31.1
psutil 6.1.1
pydantic 2.1.1
pydantic_core 2.4.0
Pygments 2.19.2
PyJWT 2.10.1
pynndescent 0.5.13
pyparsing 3.2.3
pyro-api 0.1.2
pyro-ppl 1.9.1
python-dateutil 2.9.0.post0
python-multipart 0.0.20
pytorch-lightning 2.5.2
pytz 2025.2
PyYAML 6.0.2
readchar 4.2.1
requests 2.32.4
rich 14.0.0
runs 1.2.2
s3transfer 0.13.0
scanpy 1.11.3
scikit-learn 1.7.0
scipy 1.12.0
scvi-tools 1.0.4
seaborn 0.13.2
session-info2 0.1.2
setuptools 78.1.1
simplejson 3.20.1
six 1.17.0
sniffio 1.3.1
soupsieve 2.7
sparse 0.17.0
starlette 0.47.1
starsessions 1.3.0
statsmodels 0.14.5
sympy 1.14.0
tensorboard 2.19.0
tensorboard-data-server 0.7.2
tensorstore 0.1.76
threadpoolctl 3.6.0
toolz 1.0.0
torch 2.7.1
torchmetrics 1.7.4
tqdm 4.67.1
traitlets 5.14.3
treescope 0.1.9
triton 3.3.1
types-python-dateutil 2.9.0.20250708
typing_extensions 4.14.1
tzdata 2025.2
umap-learn 0.5.9.post2
urllib3 2.5.0
uvicorn 0.35.0
wcwidth 0.2.13
websocket-client 1.8.0
websockets 12.0
Werkzeug 3.1.3
wheel 0.45.1
wrapt 1.17.2
xarray 2025.6.1
xmod 1.8.1
yarl 1.20.1
zipp 3.23.0
(cell2loc_test) test1@capios:/mnt/data/test1$


网站公告

今日签到

点亮在社区的每一天
去签到