distribution package for pyautogui and openpyxl - python

I want to install pyautogui, openpyxl with Python in a machine which does not connect to internet. Is there a distribution package of python which can do this?

You can use pip for that. However, you need a computer with internet connection (and python installed) to download the required packages first:
On the computer with internet connection, open a command line and say
pip download pyautogui openpyxl
Copy all downloaded files to the target machine, then install with
pip install ...
Where ... means all downloaded files. It is important to put them all in one line. So, all dependencies can be resolved (otherwise you need to take care to install the dependencies first).

Following steps worked for me successfully -
Dowload Anconda 3 package in a system where internet connection is there.
Download pyautogui.tar.bz2 using "pip download pytuatogui".
Copy both to a system where internet connection is not there.
Install Anacoda 3 manually.
Install the pyuaotgui.tar.bz2 using command
"conda install /path/to/local/file/.tar.bz2
Then things started working properly in a system where internet connection was not possible.

Related

How to install/ solve No model pkg-resource issue python

I have multiple issue
First issue:
I have a server which is so secure that is running
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.4
There is no internet connectivity there and I want to download some packages like
pysnmp
pandas
numpy
psutil
some others
As per my research, the best way to download from server that has internet and transfer the file to the server that does not have an internet.
I tried of things, like download tar.gz of the package or use basket or take full package but no use
Second issue:
While I am trying, I am getting No module named pkg_resources error.Hhow can I solve that first in-order to proceed?
my python version is
python2 is 2.7.5
python3 is 3.4.9
i am tried pip install pysnmp-4.4.12.tar.gz to the main package. it mention to be no Module pk_resource.
i tried also to use basket as per the website https://pythonhosted.org/Basket/
and i used easy_install -f ~/.basket -H None pyramid
and i got pkg_resource module error.
However When i download setuptools through the website https://pypi.org/project/setuptools/0.9.8/#installation-instructions
and i use python eazy-setup.py --user the Error is
[Errno 13] Permission denied: '/usr/lib64/python2.7/site-packages/XlsxWriter-1.1.2.dist-info'
Updated !!!!
I managed to do it Thanks for the help
I the problem is dependency tree i suggest running a local pip server : https://pypi.org/project/pypiserver/
and copy all needed package to server you can see it with:
pip freeze
and install your package with:
pip install --extra-index-url http://localhost:8080/simple/
so Here is the solution!!
For this problem:
No module named pkg_resources error
i was using pip install pysnmp or pip install pandas
i should use python -m pip install
the second issue :
the Error is [Errno 13] Permission denied: '/usr/lib64/python2.7/site-packages/XlsxWriter-1.1.2.dist-info'
the solution is sudo python -m pip install
The main reasons is that secured Server is used to have multiple users ( Main user where main function is running)
so using sudo is important
Finally how to install package is easy.
Go to pypi and download
pandas-0.25.3-cp36-cp36m-manylinux1_x86_64.whl
then sudo python3 -m pip install pandas-0.25.3-cp36-cp36-manylinux1_x86_64.whl
some Tips:
try to use virtual machine like virtual box for testing how to install and once it is install try to browser for it. Why i am saying that because i am running Windows and my server is Redhat so any solution on my windows is useless so i had to use my laptop with virtual box ( I cant download Virtual box due security)
second thing, python is different than python3 so if you use python in your virtual box which is host Linux server , you will get pandas-0.25.3-cp27-cp27-manylinux1_x86_64.whl not pandas-0.25.3-cp36-cp36-manylinux1_x86_64.whl so becareful
and Last tip once you done use sudo python whateveryouwant torun.py
again why sudo because all of your packages are inside main file not inside your user
Hope i managed to answer my self correctly

Install python packages in windows server 2016 which has no internet connection

I need to install python packages in a windows server 2016 sandbox for running a developed python model in production.This doesn't have internet connection.
My laptop is windows 2010 and the model is now running in my machine and need to push this to the server.
My question is how can i install all the required packages in my server which has no internet connection.
Thanks
Mithun
For the windows server machine make sure you have pip installed and added to path.
Then proceed with the following steps:
Since you are using windows try to download the packages from Unofficial Python Binaries in your personal laptop that has an internet connection. Try to download the whl file.
Copy / transfer the downloaded whl file to the windows server machine.
Use pip to install the copied / transferred whl file.
pip install <filname>.whl
If you dont want to install any mathematical packages, you can use the official Python Package Index (PyPI) repository.
Proceed with the following steps to download a Python Library from the Official Library:
Open the Official Python Package Index page.
Search for your required package (e.g., I am searching for a library named beautifulsoup4 link)
You need to select Download Files from the side menu. e.g.,
Download the required version whl file.
Copy / transfer the downloaded whl file to the windows server machine.
Use pip to install the copied / transferred whl file.
A simply way is to install the same python version on another machine having internet access, and use normally pip on that machine. This will download a bunch of files and installs them cleanly under Lib\site_packages of your Python installation.
You can they copy that folder to the server Python installation. If you want to be able to later add packages, you should keep both installations in sync: do not add or remove any package on the laptop without syncing with the server.

Need to install pymysql without using pip [duplicate]

This question already has answers here:
installing python packages without internet and using source code as .tar.gz and .whl
(7 answers)
Closed 4 years ago.
On my job, I need to install pymysql on several secured servers. They do not allow internet access, so I can not use pip. I did download the pymysql egg, but this requires cryprography. So I downloaded the cryptography wheel, but when running pip install on that it tries to get additional data from the web.
I'm using python3.7. Any way to get the whole pymysql package including all dependencies off line?
install pipmysql without internet
To install pmyssql on a system with no internet connectivity, you first download pymssql to a system.
Follow these steps:
1) Download the Windows installer for the Python version and processor
that is compatible with your system from the following website:
https://pypi.python.org/pypi/pymssql/2.1.1#downloads.
2) Copy the file to the CA Strong Authentication or CA Risk
Authentication server.
3) Run the installer and follow the prompts.
#zappfinger. I would suggest you download your main package and its dependencies to a local directory. Then use pip install -r requirements.txt to perform your task. For more information read link and have a look at pip help install. You should normally get your work done after carefully consulting all these help.
With the wheel's for both pymysql and cryptography in the same folder on your server, try:
pip install --find-links DIR --no-index pymysql
--find-links and --no-index will force pip to resolve the dependency only using the files in the directory DIR.
See:
https://pip.pypa.io/en/stable/user_guide/#installing-from-local-packages
installing python packages without internet and using source code as .tar.gz and .whl
And check out: https://pythonhosted.org/Basket/ for a way to put together a "basket" of packages w/ dependencies for this type of situation.

Offline centos install psutil

I am working on CentOS machine which cannot connect to internet, for some reasons I need to install a python module psutil, so I got psutil-2.1.3 package but not there is no clear instruction how manually one can install it in centOS system
This is usually pretty simple:
Got to PyPi
Download the .whl file for your Python version and copy it to your server
Run pip install path/to/wheel.whl, depending on your seetings you might need to install this with sudo or from a virtual environment
???
Profit!

Download python package with dependencies without installing

I need to download a python package with all its dependencies without installing, sneaker-net it to a computer without connection to the internet, and install it there. For example, I want to install buildbot, lettuce, etc.
The computer is a Windows 7 machine, using Python 2.7.
If the package has native extensions, I can build them on the computer.
You can use pip, with the --download option, which will download the main package and its dependancies, without installing them.
pip install --download="/path/to/downloaded/files" sneaker-net
And use these files one the local machine with:
pip install --no-index --find-links=<DIR on local machine> sneaker-net
See pip documentation --download for fast & local installs. You can use pip on Windows with cygwin for example.

Categories