P4Python 异常:需要参数 –ssl

问题描述 投票:0回答:1

我正在尝试将 P4python 库安装到最新的 Anaconda 2023.09-0 版本(python 3.11.5)中。我遇到以下问题:

pip 安装 p4python

Collecting p4python
Using cached p4python-2023.1.2477632.tar.gz (83 kB)
Preparing metadata (setup.py) … done
Building wheels for collected packages: p4python
Building wheel for p4python (setup.py) … error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [54 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-311
copying P4.py → build/lib.linux-x86_64-cpython-311
running build_ext
Found installed SSL version OpenSSL 3.1.3 19 Sep 2023 (Library: OpenSSL 3.1.3 19 Sep 2023)

 Found installed SSL libraries /depot/anaconda3.11.5_V_2023.10.02/bin/../lib
  must be root to build and install SSL
  ***********************************************
  ** Cannot build P4Python without SSL support **
  ***********************************************
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-install-wf13qjo3/p4python_5d2625cad3aa4235a970bd873c4ab531/setup.py", line 482, in <module>
      do_setup()
    File "/tmp/pip-install-wf13qjo3/p4python_5d2625cad3aa4235a970bd873c4ab531/setup.py", line 432, in do_setup
      setup(name=NAME,
    File "/depot/anaconda3.11.5_V_2023.10.02/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/depot/anaconda3.11.5_V_2023.10.02/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
             ^^^^^^^^^^^^^^^^^^
    File "/depot/anaconda3.11.5_V_2023.10.02/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
    File "/depot/anaconda3.11.5_V_2023.10.02/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/depot/anaconda3.11.5_V_2023.10.02/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
      super().run_command(command)
    File "/depot/anaconda3.11.5_V_2023.10.02/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/depot/anaconda3.11.5_V_2023.10.02/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 325, in run
      self.run_command("build")
    File "/depot/anaconda3.11.5_V_2023.10.02/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/depot/anaconda3.11.5_V_2023.10.02/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
      super().run_command(command)
    File "/depot/anaconda3.11.5_V_2023.10.02/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "depot/anaconda3.11.5_V_2023.10.02/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 131, in run
      self.run_command(cmd_name)
    File "/depot/anaconda3.11.5_V_2023.10.02/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/depot/anaconda3.11.5_V_2023.10.02/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
      super().run_command(command)
    File "/depot/anaconda3.11.5_V_2023.10.02/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/tmp/pip-install-wf13qjo3/p4python_5d2625cad3aa4235a970bd873c4ab531/setup.py", line 299, in run
      raise Exception("Parameter --ssl is needed")
  **Exception: Parameter --ssl is needed**
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for p4python
  Running setup.py clean for p4python
Failed to build p4python
ERROR: Could not build wheels for p4python, which is required to install pyproject.toml-based projects

请帮忙解决问题。

我尝试安装不同版本的 P4Python,但最新的 Anaconda 版本也出现了同样的问题。

anaconda python-3.11 p4python
1个回答
0
投票

我咨询了 Perforce 支持,说明有效:

https://raw.githubusercontent.com/perforce/p4python/master/build.md

© www.soinside.com 2019 - 2024. All rights reserved.