Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

库冲突 #104

Open
ivoidcat opened this issue Mar 18, 2024 · 8 comments
Open

库冲突 #104

ivoidcat opened this issue Mar 18, 2024 · 8 comments

Comments

@ivoidcat
Copy link

ivoidcat commented Mar 18, 2024

mac m1直接使用pip install -r requirements.txt --no-deps
安装会ModuleNotFoundError: No module named 'torch',
而用pip install -r requirements.txt 则会冲突

The conflict is caused by:
The user requested numpy==1.22.0
altair 5.2.0 depends on numpy
blis 0.7.11 depends on numpy>=1.19.0; python_version >= "3.9"
contourpy 1.2.0 depends on numpy<2.0 and >=1.20
ctranslate2 4.0.0 depends on numpy
encodec 0.1.1 depends on numpy
gradio 4.19.2 depends on numpy~=1.0
gruut 2.2.3 depends on numpy<2.0.0 and >=1.19.0
librosa 0.10.0 depends on numpy>=1.20.3
matplotlib 3.8.2 depends on numpy<2 and >=1.21
numba 0.58.1 depends on numpy<1.27 and >=1.22
onnxruntime 1.17.1 depends on numpy>=1.24.2

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict
    手动安装
    pip install torch

又会alize NumPy: module compiled against API version 0x10 but this version of numpy is 0xf (Triggered internally at /Users/runner/work/pytorch/pytorch/pytorch/torch/csrc/utils/tensor_numpy.cpp:84.)
device: torch.device = torch.device(torch._C._get_default_device()), # torch.device('cpu'),
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf
Traceback (most recent call last):
File "/Users/voidcat/Cat/ODev/shuziren/clone-voice/code_dev.py", line 6, in
from TTS.api import TTS
File "/Users/voidcat/miniconda3/envs/clone_voice/lib/python3.11/site-packages/TTS/api.py", line 9, in
from TTS.cs_api import CS_API
File "/Users/voidcat/miniconda3/envs/clone_voice/lib/python3.11/site-packages/TTS/cs_api.py", line 10, in
from scipy.io import wavfile
File "/Users/voidcat/miniconda3/envs/clone_voice/lib/python3.11/site-packages/scipy/io/init.py", line 97, in
from .matlab import loadmat, savemat, whosmat
File "/Users/voidcat/miniconda3/envs/clone_voice/lib/python3.11/site-packages/scipy/io/matlab/init.py", line 45, in
from ._mio import loadmat, savemat, whosmat
File "/Users/voidcat/miniconda3/envs/clone_voice/lib/python3.11/site-packages/scipy/io/matlab/_mio.py", line 9, in
from ._mio4 import MatFile4Reader, MatFile4Writer
File "/Users/voidcat/miniconda3/envs/clone_voice/lib/python3.11/site-packages/scipy/io/matlab/_mio4.py", line 8, in
import scipy.sparse
File "/Users/voidcat/miniconda3/envs/clone_voice/lib/python3.11/site-packages/scipy/sparse/init.py", line 274, in
from ._csr import *
File "/Users/voidcat/miniconda3/envs/clone_voice/lib/python3.11/site-packages/scipy/sparse/_csr.py", line 11, in
from ._sparsetools import (csr_tocsc, csr_tobsr, csr_count_blocks,
ImportError: numpy.core.multiarray failed to import

@jianchang512
Copy link
Owner

第一步安装后再单独安装torch
pip install torch

@ivoidcat
Copy link
Author

2. pip install torch

我试过,但是会提示另外的版本冲突

alize NumPy: module compiled against API version 0x10 but this version of numpy is 0xf (Triggered internally at /Users/runner/work/pytorch/pytorch/pytorch/torch/csrc/utils/tensor_numpy.cpp:84.)
device: torch.device = torch.device(torch._C._get_default_device()), # torch.device('cpu'),
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf
Traceback (most recent call last):
File "/Users/voidcat/Cat/ODev/shuziren/clone-voice/code_dev.py", line 6, in
from TTS.api import TTS
File "/Users/voidcat/miniconda3/envs/clone_voice/lib/python3.11/site-packages/TTS/api.py", line 9, in
from TTS.cs_api import CS_API
File "/Users/voidcat/miniconda3/envs/clone_voice/lib/python3.11/site-packages/TTS/cs_api.py", line 10, in
from scipy.io import wavfile
File "/Users/voidcat/miniconda3/envs/clone_voice/lib/python3.11/site-packages/scipy/io/init.py", line 97, in
from .matlab import loadmat, savemat, whosmat
File "/Users/voidcat/miniconda3/envs/clone_voice/lib/python3.11/site-packages/scipy/io/matlab/init.py", line 45, in
from ._mio import loadmat, savemat, whosmat
File "/Users/voidcat/miniconda3/envs/clone_voice/lib/python3.11/site-packages/scipy/io/matlab/_mio.py", line 9, in
from ._mio4 import MatFile4Reader, MatFile4Writer
File "/Users/voidcat/miniconda3/envs/clone_voice/lib/python3.11/site-packages/scipy/io/matlab/_mio4.py", line 8, in
import scipy.sparse
File "/Users/voidcat/miniconda3/envs/clone_voice/lib/python3.11/site-packages/scipy/sparse/init.py", line 274, in
from ._csr import *
File "/Users/voidcat/miniconda3/envs/clone_voice/lib/python3.11/site-packages/scipy/sparse/_csr.py", line 11, in
from ._sparsetools import (csr_tocsc, csr_tobsr, csr_count_blocks,
ImportError: numpy.core.multiarray failed to import

@jianchang512
Copy link
Owner

命令后边加上 --no-deps

@ivoidcat
Copy link
Author

命令后边加上 --no-deps

试过了不行的,不确定是不是只有mac有这个问题

@ivoidcat
Copy link
Author

ivoidcat commented Mar 19, 2024

我换了台window可以,估计是mac不太兼容

@jianchang512
Copy link
Owner

安装时可以加上这个参数 --no-warn-conflict

@wilsonlv
Copy link

wilsonlv commented Apr 8, 2024

在linux上也是冲突
ERROR: Ignored the following versions that require a different python version: 0.36.0 Requires-Python >=3.6,<3.10; 0.37.0 Requires-Python >=3.7,<3.10; 0.38.0 Requires-Python >=3.7,<3.11; 0.38.1 Requires-Python >=3.7,<3.11; 0.52.0 Requires-Python >=3.6,<3.9; 0.52.0rc3 Requires-Python >=3.6,<3.9; 0.53.0 Requires-Python >=3.6,<3.10; 0.53.0rc1.post1 Requires-Python >=3.6,<3.10; 0.53.0rc2 Requires-Python >=3.6,<3.10; 0.53.0rc3 Requires-Python >=3.6,<3.10; 0.53.1 Requires-Python >=3.6,<3.10; 0.54.0 Requires-Python >=3.7,<3.10; 0.54.0rc2 Requires-Python >=3.7,<3.10; 0.54.0rc3 Requires-Python >=3.7,<3.10; 0.54.1 Requires-Python >=3.7,<3.10; 0.55.0 Requires-Python >=3.7,<3.11; 0.55.0rc1 Requires-Python >=3.7,<3.11; 0.55.1 Requires-Python >=3.7,<3.11; 0.55.2 Requires-Python >=3.7,<3.11; 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11
ERROR: Could not find a version that satisfies the requirement onnxruntime==1.17.1 (from versions: 1.15.0, 1.15.1, 1.16.0, 1.16.1, 1.16.2, 1.16.3)
ERROR: No matching distribution found for onnxruntime==1.17.1

@jianchang512
Copy link
Owner

按照 --no-deps安装 安装完毕后再单独 pip install torch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants