0

Trying to install p4python on Cygwin fails with

$pip install p4python

[... logs ...]

        File "/tmp/pip-install-6mn3hyn3/p4python_9e95a104710b449a90a68bc227a2ee69/setup.py", line 292, 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: legacy-install-failure

× Encountered error while trying to install package.
╰─> p4python

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

I am using Cygwin64 on Windows 10, specifically:

$ pip --version
pip 22.3 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)

$ python --version
Python 3.9.10

$ which python
/usr/bin/python

I tried using the wheel files from PyPi but there is no compatible platform for Cygwin.

How can I work around this ssl dependency to install the module?

I have included libssl while installing Cygwin.

Zois Tasoulas
  • 1,242
  • 1
  • 11
  • 23
  • I am aware of the questions:https://stackoverflow.com/questions/59372106/how-do-i-install-p4python-on-macos-10-15-catalina and https://stackoverflow.com/questions/54687847/cannot-build-p4python-without-ssl-support-win-10. Similar approaches do not seem to work in this case. – Zois Tasoulas Oct 21 '22 at 23:53
  • `pip` cannot find a pre-built wheel so it tries to install from sources. Compiling from sources requires P4API and OpenSSL. `setup.py` calls `openssl version` so you have to have `openssl` in the `$PATH`. – phd Oct 22 '22 at 00:48
  • 1
    @phd Thank you for your answer. I think I have these, `$ openssl version OpenSSL 1.1.1q 5 Jul 2022`, `$ which openssl /usr/bin/openssl`, `$ echo $PATH /usr/local/bin:/usr/bin:` – Zois Tasoulas Oct 22 '22 at 00:59

1 Answers1

-2

Try

python -m pip install p4python
Aavesh
  • 37
  • 1
  • 6