install boto3 on an offline RHEL server [duplicate] - python

This question already has answers here:
How to install packages offline?
(12 answers)
Closed 1 year ago.
I am trying to install boto3 on rhel 7 server.
I have pip3 installed, all the other things needed for boto3.
yum list installed | grep -i python3
I have python3.x86_64, python3-libs.x86_64, python3-pip.noarch and python3-setuptools.noarch
whereis python3
As internet connection is not setup, I am getting an error with respect to accessing
pip install boto3 #does not work due to external connection problem.
Got latest code from boto3 https://github.com/boto/boto3.git
has issues with dependencies from it.
Does anyone know of any links which might help with list of steps to follow to install boto3 when server is not connected to internet
thanks
Dan

Like raLdza pointed out
How to install packages offline?
Here are the steps:
On the system that has access to internet
The pip download command lets you download packages without installing them:
pip download -r requirements.txt
(In previous versions of pip, this was spelled pip install --download -r requirements.txt.)
On the system that has no access to internet
Then you can use
pip install --no-index --find-links /path/to/download/dir/ -r requirements.txt
to install those downloaded modules, without accessing the network.

Related

How can i download Linux python version module on Win? [duplicate]

This question already has answers here:
How to download pip module for linux using windows
(2 answers)
Closed 1 year ago.
I want to download some python package from Win to Linux.
I run pip download -r requirements.txt -d wheelhouse on Win10,
but it will download the win version package numpy-1.19.1-cp37-cp37m-win_amd64.whl
Can i download with linux verson of package on win.
I'm not entirely sure why you would want to do this. By default, pip uses your local architecture so it downloads the windows files. The pip download options has a --platform option.
You can try: pip download -r requirements.txt -d wheelhouse_linux --platform manylinux1_x86_64 [--only-binary=:all: or --no-deps]
The documentation for pip download is available here with examples.

Does Python pip work in offline environments? [duplicate]

This question already has answers here:
How to install packages offline?
(12 answers)
Closed 1 year ago.
I am currently using an offline Windows 10 environment and I need to use pip to install a package.
The traditional pip install "myPackage.tar.gz" is not working because pip makes a network request and fails because my machine has no internet.
With this in mind I tried the following command to ignore dependency checking. pip install myPackage.tar.gz -f./ --no-index –-no-deps. The command did install “Successfully ” but when I tried to use the package I got a ModuleNotFoundError.
My question is does pip work offline? If not what would be a work around?
Thank you,
Marco
Do you have those packages already downloaded in your computer?
If not, at some point you will need an internet connection.
There's pip download command which lets you download packages without installing them:
pip download -r requirements.txt
(In previous versions of pip, this was spelled pip install --download -r requirements.txt.)
When you have your packages downloaded, use pip install --no-index --find-links /path/to/download/dir/ -r requirements.txt to install what you have previously downloaded, without the need to access on internet

Download & Install pip packages offline [duplicate]

This question already has answers here:
How to install packages offline?
(12 answers)
Closed 2 years ago.
I have a virtual machine on my workplace that has no internet connection (and no docker and git). I want to install Rasa (it's an chatbot installed by Python pip package). Normally you would just type: "pip install rasa". This command doesn't function because the VM has no internet connection.
Now I installed Rasa on my private linux laptop to create a full list of dependencys that Rasa needs. How can I download all these pip packages at once? There are about 50 packages and downloading them all manually step-by-step would take many hours.
My intention is to download all requiered pip packages on my private laptop and move them (the .tar.gz files) to my Linux VM at work. After that I want to install all packages offline so that an internet connection isn't required.
Just make a requirements file:
pip freeze > requirements.txt
Then download all the packages and their dependencies:
pip download -r requirements.txt
Copy the packages to the target machine and deploy (into current dir with modules):
pip install -r requirements.txt --no-index --find-links .
Further reading is here: How to install packages offline?

Python 3.4 windows, pip install fails

I am struggling with adding to my Python 34 installation:
C:> pip install --upgrade pip
Could not find any downloads that satisfy the requirement pip in c:\python34\lib
\site-packages
Collecting pip
No distributions at all found for pip in c:\python34\lib\site-packages
What am I doing wrong?
Please help.
You need to run pip as a script and python will be the main executable.
python -m pip install -U pip
The recommended procedure will be to update from get-pip.py
curl https://bootstrap.pypa.io/get-pip.py | python
Seems I found the reason: the Windows computer is within a state agency behind a hefty firewall. I tried the same install with Python 3.4.3 from my laptop connected through my phone and had no problem at all. So, I think the firewall was in the way. Thanks for looking into this, #froost1999 and #Rockse .

Installing pip for an offline machine on Python 2.7, CentOS 6.3

I'm trying to install lxml for Centos6.3, due to this issue. It looks like I've got a conflicting version of pip. The standing solution seems to re-install pip for the correct version of python.
My main issue is that all the methods I've found for installing pip require an internet connection. Is it possible to download pip install files, and then run pip install -U pip and point it at the right files?
The PyPI page for pip only has pip6.11 as a .whl. I've tried running pip install -U pip-6.1.1-py2.py3-none-any.whl and it's not worked.
I'm stumped. How do I install it?
You could try to download pip and setuptools manually from: https://pypi.org/project/pip/#files and https://pypi.org/project/setuptools/#files
get the python pip script from: https://bootstrap.pypa.io/get-pip.py
after that unzip/untar packages and run:
python get-pip.py --no-index --find-links=/path/to/pip-and-setuptools
or alternatively trying:
python setup.py install when running in unpacked folders
More here: https://github.com/pypa/pip/issues/2351

Categories