IBM / molformer

Repository for MolFormer
Apache License 2.0
244 stars 42 forks source link

Failed building wheel for pytorch-fast-transformers #18

Open jinfeng-data opened 10 months ago

jinfeng-data commented 10 months ago

Hi, I am trying to install the MolFormer environment. When I run "pip install transformers==4.6.0 pytorch-lightning==1.1.5 pytorch-fast-transformers==0.4.0 datasets==1.6.2 jupyterlab==3.4.0 ipywidgets==7.7.0 bertviz==1.4.0", it fails, and the error messages are like the following:

_Building wheels for collected packages: pytorch-fast-transformers Building wheel for pytorch-fast-transformers (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [151 lines of output] No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-11.1' running bdist_wheel running build running build_py .......... /home/jinfeng/soft/miniconda3/envs/MolTran_CUDA11/compiler_compat/ld: cannot find -lc10_cuda: 没有那个文件或目录 /home/jinfeng/soft/miniconda3/envs/MolTran_CUDA11/compiler_compat/ld: cannot find -ltorch_cuda: 没有那个文件或目录 collect2: 错误:ld 返回 1 error: command 'g++' failed with exit status 1 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pytorch-fast-transformers Running setup.py clean for pytorch-fast-transformers Failed to build pytorch-fast-transformers ERROR: Could not build wheels for pytorch-fast-transformers, which is required to install pyproject.toml-based projects

What should I do to fix the above problem ? Thanks in advance.

Basspoom commented 2 months ago

I encounter a similar error: "pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pytorch-fast-transformers==0.4.0 Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting pytorch-fast-transformers==0.4.0 Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ea/bc/00f597fefeab6341114c41045c1b232c38436738e0e8eac1bc9d5e9d5962/pytorch-fast-transformers-0.4.0.tar.gz (93 kB) Preparing metadata (setup.py) ... done ...... Building wheels for collected packages: pytorch-fast-transformers Building wheel for pytorch-fast-transformers (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [148 lines of output] ...... [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pytorch-fast-transformers Running setup.py clean for pytorch-fast-transformers Failed to build pytorch-fast-transformers ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pytorch-fast-transformers)"

I fix this issue by run command "pip install torch torchvision torchaudio". Then try "pip install pytorch-fast-transformers==0.4.0" again.