Should PIP be able to install packages from PyPi?

Post Reply

Topic author
pesc
Newbie
Posts: 4
Joined: Fri Jun 18, 2021 9:54 am
Reputation: 0
Status: Offline

Should PIP be able to install packages from PyPi?

Post by pesc » Mon Mar 13, 2023 1:05 pm

The VSI intro page for Python says so. And the release notes for PYTHON 3.10 says so too.

But I have no success. I am trying to install the simple package emoji. I first undisable PyPi searching by defining the logical name PIP_NO_INDEX to 0.

Code: Select all

$ def pip_no_index 0
$ python -m pip install emoji
WARNING: Value for scheme.headers does not match. Please report this to <https:/
/github.com/pypa/pip/issues/10151>
distutils: /python$root/include/python3.10/UNKNOWN
sysconfig: /python$root/include/UNKNOWN
WARNING: Value for scheme.scripts does not match. Please report this to <https:/
/github.com/pypa/pip/issues/10151>
distutils: /python$root/bin
sysconfig: /python$root/scripts
WARNING: Additional context:
user = False
home = None
root = None
prefix = None
WARNING: pip is configured with locations that require TLS/SSL, however the ssl 
module in Python is not available.
Looking in links: /python_wheels$root
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status
=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because
 the SSL module is not available.")': /simple/emoji/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status
=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because
 the SSL module is not available.")': /simple/emoji/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status
=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because
 the SSL module is not available.")': /simple/emoji/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status
=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because
 the SSL module is not available.")': /simple/emoji/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status
=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because
 the SSL module is not available.")': /simple/emoji/
Could not fetch URL https://pypi.org/simple/emoji/: There was a problem confirmi
ng the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retr
ies exceeded with url: /simple/emoji/ (Caused by SSLError("Can't connect to HTTP
S URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement emoji (from versi
ons: none)
ERROR: No matching distribution found for emoji
WARNING: pip is configured with locations that require TLS/SSL, however the ssl 
module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming
 the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retrie
s exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS UR
L because the SSL module is not available.")) - skipping
Seems to be an issue with the ssl module...

Code: Select all

$ python
Python 3.10.0 (default, Nov 25 2021, 10:52:09) [C] on OpenVMS
Type "help", "copyright", "credits" or "license" for more information.
>>> from ssl import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/python$root/lib/python3.10/ssl.py", line 98, in <module>
    import _ssl             # if we can't import it, let the error propagate
ImportError: %LIB-E-ACTIMAGE, error activating image SIV$DKA100:[SYS0.SYSCOMMON.
][SYSLIB]LIBCRYPTO.EXE;
-RMS-E-FNF, file not found
>>> 
What is LIBCRYPTO?

Code: Select all

$ d sys$library:*libcrypto*

Directory SYS$COMMON:[SYSLIB]

SSL$LIBCRYPTO_SHR.EXE;1                 SSL$LIBCRYPTO_SHR32.EXE;1
SSL1$LIBCRYPTO_SHR.EXE;1                SSL1$LIBCRYPTO_SHR32.EXE;1

Total of 4 files.
$ prod show prod *ssl*
------------------------------------ ----------- ---------
PRODUCT                              KIT TYPE    STATE
------------------------------------ ----------- ---------
VSI I64VMS SSL V1.4-503              Full LP     Installed
VSI I64VMS SSL1 V1.0-2UA             Full LP     Installed
------------------------------------ ----------- ---------
2 items found
If I point the logical LIBCRYPTO to either of the SSL libraries I get a ident mismatch.

Does anyone have any suggestions on what I should do? Or is it futile to try to load PyPi packages on VMS?
Thanks for any help


sms
Master
Posts: 317
Joined: Fri Aug 21, 2020 5:18 pm
Reputation: 0
Status: Offline

Re: Should PIP be able to install packages from PyPi?

Post by sms » Mon Mar 13, 2023 2:18 pm

Code: Select all

> The VSI intro page for Python [...]

   Thanks for the helpful link.  And you're running all this on _what_,
exactly?

> Seems to be an issue with the ssl module...
> [..]

   I'd guess that you're looking at some old/obsolete version(s).

> What is LIBCRYPTO?

   One of the two [Open]SSL (object libraries (.OLB) or) shared images
(.EXE).  For example:

ITS $ dire /date SYS$LIBRARY:ssl111*.exe

Directory SYS$COMMON:[SYSLIB]

SSL111$LIBCRYPTO_SHR.EXE;1      25-JUL-2022 14:27:58.23
SSL111$LIBCRYPTO_SHR32.EXE;1    25-JUL-2022 11:31:43.69
SSL111$LIBSSL_SHR.EXE;1         25-JUL-2022 14:28:38.78
SSL111$LIBSSL_SHR32.EXE;1       25-JUL-2022 11:32:28.61

Total of 4 files.

   To avoid interference between different SSL versions, different
versions are installed in different places, with different name
prefixes, and with a variety of logical names pointing to them.  The
user needs to get the appropriate logical names defined.

> VSI I64VMS SSL V1.4-503              Full LP     Installed
> VSI I64VMS SSL1 V1.0-2UA             Full LP     Installed

   Not the most recent SSL kits.

>  If I point the logical LIBCRYPTO to [...]

   I wouldn't do that.

> [...] either of the SSL libraries I get a ident mismatch.

   Find out which SSL version was used to build this stuff in the first
place, and then install that?

   Around here:

ITS $ prod show prod ssl*
------------------------------------ ----------- ---------
PRODUCT                              KIT TYPE    STATE
------------------------------------ ----------- ---------
VSI I64VMS SSL V1.4-503              Full LP     Installed
VSI I64VMS SSL1 V1.0-2UA             Full LP     Installed
VSI I64VMS SSL111 V1.1-1Q            Full LP     Installed
VSI I64VMS SSL3 V3.0-5               Full LP     Installed
------------------------------------ ----------- ---------
4 items found

ITS $ show logical ssl*$root
[...]
(LNM$SYSTEM_TABLE)

  "SSL$ROOT" = "SYS$SYSDEVICE:[VMS$COMMON.SSL.]"
  "SSL1$ROOT" = "SYS$SYSDEVICE:[VMS$COMMON.SSL1.]"
  "SSL111$ROOT" = "SYS$SYSDEVICE:[VMS$COMMON.SSL111.]"
  "SSL3$ROOT" = "SYS$SYSDEVICE:[VMS$COMMON.SSL3.]"
[...]

   The last two of those might be (reasonably) current.  If I had to
guess, I'd guess that the "111" version is the most likely one to have
been used by anyone, but that's only a guess.

   Someplace in the SSL docs, a "start-up" DCL script should get
mentioned.  One or more of these should get run as part of the system
start-up procedure, to define the basic logical names, and so on (for
each version of interest).  Around here:

ITS $ dire /date SYS$STARTUP:ssl*.com

Directory SYS$COMMON:[SYS$STARTUP]

SSL$SHUTDOWN.COM;1      5-FEB-2016 15:07:58.71
SSL$STARTUP.COM;1       5-FEB-2016 15:07:58.69
SSL1$SHUTDOWN.COM;1     9-JAN-2020 04:36:21.00
SSL1$STARTUP.COM;1      9-JAN-2020 04:36:21.00
SSL111$SHUTDOWN.COM;1   25-JUL-2022 08:49:44.12
SSL111$STARTUP.COM;1    25-JUL-2022 08:49:44.13
SSL3$SHUTDOWN.COM;1     25-JUL-2022 12:43:37.52
SSL3$STARTUP.COM;1      25-JUL-2022 12:43:37.46

Total of 8 files.

> Does anyone have any suggestions on what I should do? [...]

   I'd start by getting a less obsolete SSL kit installed and
configured.  I know approximately nothing about Python (on VMS or any
other place), so I don't know which SSL kit it expects to see.  Perhaps
the documentation offers a clue.  At least one of us may need to explore
that.


Topic author
pesc
Newbie
Posts: 4
Joined: Fri Jun 18, 2021 9:54 am
Reputation: 0
Status: Offline

Re: Should PIP be able to install packages from PyPi?

Post by pesc » Mon Mar 13, 2023 4:11 pm

Thanks for your reply. I solved the problem. I had PYTHON A3.10-0RELEASE001 installed which I downloaded some time ago from VSI. The version pointed to in the product page is PYTHON A3.10-0RELEASE005 which works better. My fault.

Here is a link to the VSI Python product page, which has a link to the release notes:
https://vmssoftware.com/products/python/
Last edited by pesc on Mon Mar 13, 2023 4:14 pm, edited 1 time in total.


sms
Master
Posts: 317
Joined: Fri Aug 21, 2020 5:18 pm
Reputation: 0
Status: Offline

Re: Should PIP be able to install packages from PyPi?

Post by sms » Mon Mar 13, 2023 6:28 pm

Code: Select all

> [...] PYTHON A3.10-0RELEASE005 which works better. [...]

   Thanks for the report.  I see there's a mention of SSL in the release
notes:

      4. What's new in this release?
      [...] The release also fixes a minor bug with the crypto module
      that required additional logical names to be defined in order for
      the module to load OpenSSL libraries correctly. [...]

Sounds suspicious to me.

https://vmssoftware.com/openkits/i64opensource/I64VMS-PYTHON-A0310-0RELEASE005-1-RNOTES.PDF

User avatar

neilrieck
Contributor
Posts: 19
Joined: Tue Jan 10, 2023 10:41 am
Reputation: 0
Location: Waterloo, Ontario, Canada
Status: Offline
Contact:

Re: Should PIP be able to install packages from PyPi?

Post by neilrieck » Wed Jul 19, 2023 6:13 am

For users sitting behind a firewall who need to negotiate a proxy server, you will need to do something like this:

Code: Select all

def PIP_NO_INDEX 0
python -m pip install pymysql -
  --trusted-host pypi.org -
  --trusted-host files.pythonhosted.org -
  --proxy http://proxy.your-domain.com:8083
Notes
  • mysql-connector-python is the better connector but it does not work on OpenVMS. While connecting, it will throw this error message: "Command '('lsb_release', '-a')' returned non-zero exit status 1."
  • pymysq works but the connection syntax is a little bit different
Last edited by neilrieck on Fri Feb 02, 2024 11:45 am, edited 1 time in total.

Post Reply