Original Message:
Sent: Fri March 24, 2023 01:45 PM
From: Stephen Ulmer
Subject: pip install option 'no-index'
Also note that ALL of your (missing) Python dependencies have to be in the directory pointed to by
--find-links. You should really be using a requirements file, and doing something like:
python3 -m pip download --dest=dldir/mystuff --requirements=requirements.txt
possibly also including --platform= if downloading on a non-AIX system.
That will download what you need and all of the calculated dependencies, as well as put a requirements file in that directory that has all of the versions specified. You can then install the modules with pip like you are trying to do.
Depending on your needs, you may also need to use PIP's constraints system.
Finally, as Ayappan mentioned again, you will install RPMs with the rpm command and Python packages with the pip command/module. There is no tool that coordinates dependencies between these two worlds. Just like RPMs and LPPs are managed separately, so are Python modules. Just because an RPM happens to contain a Python module, doesn't mean that you can install it with PIP - you still need to use RPM on RPMs packages. PIP is yet another package manager, but it only handles Python modules. So you need to install all of the RPMs you want/need first, then try to use PIP to install matplotlib and other not-yet-satisfied Python dependencies.
I hope this helped. :)
--
Stephen L. Ulmer
Enterprise Architect
Mainline Information Systems
Original Message:
Sent: 3/24/2023 11:30:00 AM
From: Ayappan P
Subject: RE: pip install option 'no-index'
1) Run like this " python3 -m pip install --no-index --find-links=/tmp/abcd matplotlib " . No need to give "matplotlib-3.5.1.tar.gz"
2) You can't use pip to install rpm packages. You need to use rpm command or dnf to install rpm packages.
------------------------------
Ayappan P
Original Message:
Sent: Fri March 24, 2023 10:43 AM
From: Mi Wang
Subject: pip install option 'no-index'
Hi Ayappan,
Can you please answer my above questions: 1) Why '--no-index' option not working? 2) if I want pip to look into AIX Toolbox repository for dependency packages, what should I put as parameter for --find-links option?
I have provided the information for 1) my full python pip command; 2) how we install AIX Toolbox repository.
Thanks
Mi
------------------------------
Mi Wang
Original Message:
Sent: Thu March 23, 2023 11:03 AM
From: Mi Wang
Subject: pip install option 'no-index'
To Stephen's question: no, we don't have requirements and/or constraints file.
Thanks
Mi
------------------------------
Mi Wang
Original Message:
Sent: Thu March 23, 2023 10:55 AM
From: Mi Wang
Subject: pip install option 'no-index'
Thank you all for trying to check into this. It's my bad not providing the full command. The following is it:
python3 -m pip install --no-index --find-links=/tmp/abcd matplotlib-3.5.1.tar.gz
By the way, if I want pip to look into AIX Toolbox repository for dependency packages, what should I put as parameter for --find-links option? (we use 'gzip -dc *Toolbox_for_linux_*.tar.gz | tar xf - -C /mnt' to create the repository locally)
Thanks
Mi
------------------------------
Mi Wang
Original Message:
Sent: Thu March 23, 2023 05:41 AM
From: Ayappan P
Subject: pip install option 'no-index'
You need to pass the <package> argument also. The <package> which needs to be installed.
------------------------------
Ayappan P
Original Message:
Sent: Wed March 22, 2023 05:19 PM
From: Mi Wang
Subject: pip install option 'no-index'
Hi,
We are trying to run python pip command with '--no-index' option to avoid our server connecting to internet. But we got 'Invalid requirement' message. Can someone help?
$ python3 -m pip install --no-index --find-links=......
ERROR: Invalid requirement: '--no-index'
Thanks
Mi
------------------------------
Mi Wang
------------------------------