我想探索Python库graphmuse。这取决于 PyTorch 和 PyTorch Geometric - 请参阅博客 here
我创建了一个虚拟环境,并在虚拟环境中使用了python 3.12作为解释器。
(venv) PS
C:\Users\phlip\OneDrive\Applic_Dev\za\co\driep01\Python_ppp\Music_Graphs\Symbolic_Music_Graph_Processing\graphmuse> python -V
Python 3.12.
我已经安装了依赖项,但是当我尝试安装 graphmuse 时,出现错误:
(venv) PS C:\Users\phlip\OneDrive\Applic_Dev\za\co\driep01\Python_ppp\Music_Graphs\Symbolic_Music_Graph_Processing> pip install graphmuse
ERROR: Could not find a version that satisfies the requirement graphmuse (from versions: none)
ERROR: No matching distribution found for graphmuse
然后我按照此博客的作者建议的替代程序进行操作,即:
From Source
You can also install GraphMuse from source. First, clone the repository:
git clone https://github.com/manoskary/graphmuse.git
cd graphmuse
Then use pip for the rest of the dependencies:
pip install --verbose git+https://github.com/pyg-team/pyg-lib.git
pip install --verbose torch_scatter
pip install --verbose torch_sparse
pip install --verbose torch_cluster
pip install partitura
但是,当我运行 pip install --verbose git+https://github.com/pyg-team/pyg-lib.git 时,我收到另一个错误,即
File "C:\Users\phlip\AppData\Local\Temp\pip-build-env-3v4_nxcd\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 502, in _build_extensions_serial
self.build_extension(ext)
File "<string>", line 42, in build_extension
ModuleNotFoundError: No module named 'torch'
error: subprocess-exited-with-error
× Building wheel for pyg_lib (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: 'C:\Users\phlip\OneDrive\Applic_Dev\za\co\driep01\Python_ppp\Music_Graphs\Symbolic_Music_Graph_Processing\venv\Scripts\python.exe' 'C:\Users\phlip\OneDr
ive\Applic_Dev\za\co\driep01\Python_ppp\Music_Graphs\Symbolic_Music_Graph_Processing\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py' build_wheel 'C:\Users\phlip\AppData\Local\Temp\tmpq6n2uak_'
cwd: C:\Users\phlip\AppData\Local\Temp\pip-req-build-hxja4eqz
Building wheel for pyg_lib (pyproject.toml) ... error
ERROR: Failed building wheel for pyg_lib
Failed to build pyg_lib
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyg_lib)
有人可以指导我如何解决这个问题吗?
菲利普
他们目前仅在 pypi 上提供 python 3.10 和 python 3.11 版本预构建:
https://pypi.org/project/graphmuse/#files
我建议切换到 Python 3.11 并使用 pip 进行安装。