无法使用pip安装PYO

06odsfpq  于 2022-10-04  发布在  Linux
关注(0)|答案(1)|浏览(332)

尝试使用pip安装PYO时出现错误

$pip安装PYO

Collecting pyo 
 Using cached pyo-1.0.4.tar.gz (6.1 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:UsersVAAppDataLocalTemppip-install-06kfbyzbpyo_9bd28f6f7eba4c5aa2896ae564b089f6setup.py", line 293, in <module>
          for f in os.listdir(data_files_common_path)
      FileNotFoundError: [WinError 3] The system cannot find the path specified: 'win64dlls\win64_pyo_data_files_common'
      [end of output]

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

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

然后我试着

$pip INSTALL PYO--USE-DEVERATED=Back Track-On-Build-Failures

DEPRECATION: Backtracking on build failures can mask issues related to how a package generates metadata or builds a wheel. This flag will be removed in pip 22.2. A possible replacement is avoiding known-bad versions by explicitly telling pip to ignore them (either directly as requirements, or via a constraints file). Discussion can be found at https://github.com/pypa/pip/issues/10655
Collecting pyo
  Using cached pyo-1.0.4.tar.gz (6.1 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:UsersVAAppDataLocalTemppip-install-_t68yakopyo_d26c3df31ce44e44babd1e5def6de075setup.py", line 293, in <module>
          for f in os.listdir(data_files_common_path)
      FileNotFoundError: [WinError 3] The system cannot find the path specified: 'win64dlls\win64_pyo_data_files_common'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
WARNING: Discarding https://files.pythonhosted.org/packages/7a/4a/a681a4c1c6db790b39f24c3384debedd583db48bea47362640ebcab1f3a6/pyo-1.0.4.tar.gz#sha256=34937eba641ed6b1c8ede1c35f30ad5e08493ec1f09352398790910bfd19d445 (from https://pypi.org/simple/pyo/) (requires-python:>=3.6, <4) due to build failure: metadata generation failed
  Using cached pyo-1.0.3.tar.gz (5.2 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:UsersVAAppDataLocalTemppip-install-_t68yakopyo_3f80885b827046bbb8de3e7c16e16c7bsetup.py", line 215, in <module>
          [os.path.join(data_files_common_path, f) for f in os.listdir(data_files_common_path) if f.endswith(".dll")])]
      FileNotFoundError: [WinError 3] The system cannot find the path specified: 'win64dlls\win64_pyo_data_files_common'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
WARNING: Discarding https://files.pythonhosted.org/packages/60/ea/e717ec9cef74dc4a26000b29b1cf8703e2871d9edaae189dc515d8e74910/pyo-1.0.3.tar.gz#sha256=f0d187a78e3ab9f10275853a22b6a08094aeed4e0c2adee8697734373aa8dd1f (from https://pypi.org/simple/pyo/) (requires-python:>=3.6, <4) due to build failure: metadata generation failed
  Using cached pyo-1.0.2.tar.gz (5.2 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:UsersVAAppDataLocalTemppip-install-_t68yakopyo_7636aa31397442f693130603d4cb92d8setup.py", line 215, in <module>
          [os.path.join(data_files_common_path, f) for f in os.listdir(data_files_common_path) if f.endswith(".dll")])]
      FileNotFoundError: [WinError 3] The system cannot find the path specified: 'win64dlls\win64_pyo_data_files_common'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
WARNING: Discarding https://files.pythonhosted.org/packages/4c/48/2b5ea0d2e52edbb3d440fbbf7992f52c9727b2c4117f11b6348abf51706b/pyo-1.0.2.tar.gz#sha256=cb716d2c38a02f3aafba2cb5a47af67d78433580f6536c57fd0883283d3bf64a (from https://pypi.org/simple/pyo/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4) due to build failure: metadata generation failed
  Using cached pyo-1.0.1.tar.gz (5.2 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:UsersVAAppDataLocalTemppip-install-_t68yakopyo_9550d20742e24085af8ace9202cb7913setup.py", line 212, in <module>
          [os.path.join(data_files_common_path, f) for f in os.listdir(data_files_common_path) if f.endswith(".dll")])]
      FileNotFoundError: [WinError 3] The system cannot find the path specified: 'win64dlls\win64_pyo_data_files_common'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
WARNING: Discarding https://files.pythonhosted.org/packages/9c/f2/87f07599a2f107f02a9f7cf11599c5eecf37662356296e1236c17ec997f4/pyo-1.0.1.tar.gz#sha256=e85a3e9e4e17769c4178c907e6b8f01bc455fe0fa348b0ce64d5698ec7e82202 (from https://pypi.org/simple/pyo/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4) due to build failure: metadata generation failed
  Using cached pyo-1.0.0.tar.gz (5.1 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:UsersVAAppDataLocalTemppip-install-_t68yakopyo_712915a0221348b59415409f622bde9fsetup.py", line 211, in <module>
          [os.path.join(data_files_common_path, f) for f in os.listdir(data_files_common_path) if f.endswith(".dll")])]
      FileNotFoundError: [WinError 3] The system cannot find the path specified: 'win64dlls\win64_pyo_data_files_common'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
WARNING: Discarding https://files.pythonhosted.org/packages/67/0f/2c3f9fb88effc62571c209525b5e84d1ec0b68611c916daa96ae8c84f43f/pyo-1.0.0.tar.gz#sha256=4ad45d32ae6ef5865762594223bddf0d6efa7e45657b899b16cda33ce328ebfd (from https://pypi.org/simple/pyo/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4) due to build failure: metadata generation failed
ERROR: Could not find a version that satisfies the requirement pyo (from versions: 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4)
ERROR: No matching distribution found for pyo

PYTHON版本

$python--版本

Python3.10.4

已尝试安装AJAX SOUND STUDIO pyo

对于AJAX Sound Studio,我尝试了最新的PYO 0.9.1,但错误仍然存在,所以我尝试使用PYO 0.8.4。

尽管如此,问题仍然没有得到解决。

上述终端输出来自Windows中的Anaconda Promt。我还试着在Ubuntu中安装了PYO。在该操作系统中,我也面临着安装PYO的问题。

用于在Ubuntu中安装的终端输出

$pip安装PYO

Terminal output

已尝试使用Conda安装PYO,但未找到程序包

$CONDA INSTALL PIO

jhdbpxl9

jhdbpxl91#

查看[PYPI]:PYO1.0.4-下载文件(应答时最新发布的版本),如果以下所有适用,则可以使用预构建的*.Whls(用于Win*):

**Python版本:v3.9v3.8v3.7v3.6
PythonARCH
pc064(WIN_AMD64)

此外,从源代码构建(如果没有预构建的*.Whl则回退)很复杂(并且**不工作OOTB**-只尝试Win,但我99%确定NIX是相同的),因为它需要一些额外的步骤(构建/使用一堆依赖项),所以错误会弹出(如果修复了,就会出现另一个错误,依此类推)。

所以,坚持使用受支持的Python版本,直到发布新的pyo版本(这个版本是*1+*年)。
当然,从源头开始构建也是一种选择,但它需要更深层次的知识。

更新*#0*

构建*.whl并在**[GitHub]: CristiFati/Prebuilt-Binaries - (master) Prebuilt-Binaries/PyO/v1.0.4**上发布(对于Python*,Win_AMD64v3.11V3.10**和Win32*,对于当前的Python版本)。查看[SO]: Installing pygraphviz on Windows 10 64-bit, Python 3.6 (@CristiFati's answer)(末尾的快捷方式部分)了解自定义*.whl*安装的详细信息。

我使用以下脚本(快速)测试它们。

  • code00.py*:

# !/usr/bin/env python

import sys
import time

import pyo

def main(*argv):
    sample_name = "Sine"
    sample_class = getattr(pyo, sample_name, None)
    if sample_class is None:
        print("Invalid sample: {:s}".format(sample_name))
        return -1
    secs = 2
    out_file = "{:s}.wav".format(sample_name)
    srv = pyo.Server().boot()
    print("Playing sound ({:s}) for {:.3f} seconds (and saving to '{:s}') ...".format(sample_name, secs, out_file))
    srv.start()
    srv.recstart(out_file)
    sample = sample_class(mul=0.01).out()
    print("Sample: {:}".format(sample))
    time.sleep(secs)
    srv.recstop()
    srv.stop()
    sfp = pyo.SfPlayer(out_file)
    print("SFP: {:}".format(sfp))

if __name__ == "__main__":
    print("Python {:s} {:03d}bit on {:s}n".format(" ".join(elem.strip() for elem in sys.version.split("n")),
                                                   64 if sys.maxsize > 0x100000000 else 32, sys.platform))
    rc = main(*sys.argv[1:])
    print("nDone.n")
    sys.exit(rc)

输出

[cfati@CFATI-5510-0:e:WorkDevStackOverflowq073508905]> sopr.bat

### Set shorter prompt to better fit when pasted in StackOverflow (or other) pages ###

[prompt]> :: ------- PYTHON 3.10 -------
[prompt]> "e:WorkDevVEnvspy_pc064_03.10_test0Scriptspython.exe" -m pip install "e:WorkDevGitHubCristiFatiPrebuilt-Binariespyov1.0.4pyo-1.0.4-cp310-cp310-win_amd64.whl"
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Processing e:workdevgithubcristifatiprebuilt-binariespyov1.0.4pyo-1.0.4-cp310-cp310-win_amd64.whl
Installing collected packages: pyo
Successfully installed pyo-1.0.4
WARNING: You are using pip version 21.3.1; however, version 22.2.2 is available.
You should consider upgrading via the 'e:WorkDevVEnvspy_pc064_03.10_test0Scriptspython.exe -m pip install --upgrade pip' command.

[prompt]>
[prompt]> "e:WorkDevVEnvspy_pc064_03.10_test0Scriptspython.exe" ./code00.py

WxPython is not found for the current python version.
Pyo will use a minimal GUI toolkit written with Tkinter (if available).
This toolkit has limited functionnalities and is no more
maintained or updated. If you want to use all of pyo's
GUI features, you should install WxPython, available here:
http://www.wxpython.org/

Python 3.10.1 (tags/v3.10.1:2cd268a, Dec  6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)] 064bit on win32

Pyo warning: Portmidi closed.
Playing sound (Sine) for 2.000 seconds (and saving to 'Sine.wav') ...
Sample: < Instance of Sine class >
SFP: < Instance of SfPlayer class >

Done.

[prompt]>
[prompt]> :: ------- PYTHON 3.11 -------
[prompt]> "e:WorkDevVEnvspy_pc064_03.11_test0Scriptspython.exe" -m pip install "e:WorkDevGitHubCristiFatiPrebuilt-Binariespyov1.0.4pyo-1.0.4-cp311-cp311-win_amd64.whl"
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Processing e:workdevgithubcristifatiprebuilt-binariespyov1.0.4pyo-1.0.4-cp311-cp311-win_amd64.whl
Installing collected packages: pyo
Successfully installed pyo-1.0.4
WARNING: You are using pip version 21.3.1; however, version 22.2.2 is available.
You should consider upgrading via the 'e:WorkDevVEnvspy_pc064_03.11_test0Scriptspython.exe -m pip install --upgrade pip' command.

[prompt]>
[prompt]> "e:WorkDevVEnvspy_pc064_03.11_test0Scriptspython.exe" ./code00.py

WxPython is not found for the current python version.
Pyo will use a minimal GUI toolkit written with Tkinter (if available).
This toolkit has limited functionnalities and is no more
maintained or updated. If you want to use all of pyo's
GUI features, you should install WxPython, available here:
http://www.wxpython.org/

Python 3.11.0rc1 (main, Aug  8 2022, 11:30:54) [MSC v.1932 64 bit (AMD64)] 064bit on win32

Pyo warning: Portmidi closed.
Playing sound (Sine) for 2.000 seconds (and saving to 'Sine.wav') ...
Sample: < Instance of Sine class >
SFP: < Instance of SfPlayer class >

Done.

[prompt]>
[prompt]> :: ------- PYTHON 3.7 (!!! PC032 !!!) -------
[prompt]> "e:WorkDevVEnvspy_pc032_03.07_test0Scriptspython.exe" -m pip install "e:WorkDevGitHubCristiFatiPrebuilt-Binariespyov1.0.4pyo-1.0.4-cp37-cp37m-win32.whl"
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Processing e:workdevgithubcristifatiprebuilt-binariespyov1.0.4pyo-1.0.4-cp37-cp37m-win32.whl
Installing collected packages: pyo
Successfully installed pyo-1.0.4
WARNING: You are using pip version 20.3.3; however, version 22.2.2 is available.
You should consider upgrading via the 'e:WorkDevVEnvspy_pc032_03.07_test0Scriptspython.exe -m pip install --upgrade pip' command.

[prompt]>
[prompt]> "e:WorkDevVEnvspy_pc032_03.07_test0Scriptspython.exe" ./code00.py

WxPython is not found for the current python version.
Pyo will use a minimal GUI toolkit written with Tkinter (if available).
This toolkit has limited functionnalities and is no more
maintained or updated. If you want to use all of pyo's
GUI features, you should install WxPython, available here:
http://www.wxpython.org/

Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:01:55) [MSC v.1900 32 bit (Intel)] 032bit on win32

Pyo warning: Portmidi closed.
Playing sound (Sine) for 2.000 seconds (and saving to 'Sine.wav') ...
Sample: < Instance of Sine class >
SFP: < Instance of SfPlayer class >

Done.

相关问题