How to - Install Python and Paramiko in offline Windows environment (Optimized Method)
After using more and more Paramiko and Python for automation of endpoint testing and changed requirements for the the usage of Paramiko in newer versions my old how-to becomes outdated.
With the newest release of Python, Python 3.6, I started to optimize the installation process to reduce complexity and make the installation process more simple. Instead of downloading manually all required files from the different homepages I use Python included functions for this work.
Step by Step overview:
1. Creation of reference system
For preparation of the required files and for verification I'm using normally a test system i setup in VMware Fusion on my MacBook. For the Microsoft operating system I use the trial version from Microsoft Technet Evaluation Center for 180 days testing. After the system is finally setup based on my requirements I create a snapshot to have a valid reference point for my installation.
2. Installation of Python in reference system and downloading of required packages
After setting up the reference system I create a snapshot of the virtual machine I start the installation of Python. After finishing the installation
The process of downloading can be seen in the command line and would look similar to that.pip download paramiko --dest c:\paramiko
After downloading the files can be found in the folder c:\paramiko ready for further usage.Collecting paramikoDownloading paramiko-2.1.1-py2.py3-none-any.whl (172kB)
100% |████████████████████████████████| 174kB 2.2MB/s
Saved c:\paramiko\paramiko-2.1.1-py2.py3-none-any.whl
Collecting pyasn1>=0.1.7 (from paramiko)Downloading pyasn1-0.1.9-py2.py3-none-any.whlSaved c:\paramiko\pyasn1-0.1.9-py2.py3-none-any.whlCollecting cryptography>=1.1 (from paramiko)Downloading cryptography-1.7.1-cp36-cp36m-win32.whl (901kB)100% |████████████████████████████████| 911kB 1.1MB/sSaved c:\paramiko\cryptography-1.7.1-cp36-cp36m-win32.whlCollecting six>=1.4.1 (from cryptography>=1.1->paramiko)Downloading six-1.10.0-py2.py3-none-any.whlSaved c:\paramiko\six-1.10.0-py2.py3-none-any.whlCollecting idna>=2.0 (from cryptography>=1.1->paramiko)Downloading idna-2.2-py2.py3-none-any.whl (55kB)100% |████████████████████████████████| 61kB 4.0MB/sSaved c:\paramiko\idna-2.2-py2.py3-none-any.whlCollecting setuptools>=11.3 (from cryptography>=1.1->paramiko)Downloading setuptools-32.3.1-py2.py3-none-any.whl (479kB)100% |████████████████████████████████| 481kB 1.6MB/sSaved c:\paramiko\setuptools-32.3.1-py2.py3-none-any.whlCollecting cffi>=1.4.1 (from cryptography>=1.1->paramiko)Downloading cffi-1.9.1-cp36-cp36m-win32.whl (146kB)100% |████████████████████████████████| 153kB 3.3MB/sSaved c:\paramiko\cffi-1.9.1-cp36-cp36m-win32.whlCollecting pycparser (from cffi>=1.4.1->cryptography>=1.1->paramiko)Downloading pycparser-2.17.tar.gz (231kB)100% |████████████████████████████████| 235kB 2.2MB/sSaved c:\paramiko\pycparser-2.17.tar.gzSuccessfully downloaded paramiko pyasn1 cryptography six idna setuptools cffi pycparser
3. Creation of requirements.txt file
After all files are downloaded I created a requirements.txt file to put the installaton of the packages in the right order. The order for the installation of Paramiko is the following:
six-1.10.0-py2.py3-none-any.whlpyasn1-0.1.9-py2.py3-none-any.whl
idna-2.2-py2.py3-none-any.whlpycparser-2.17.tar.gzcffi-1.9.1-cp36-cp36m-win32.whlcryptography-1.7.1-cp36-cp36m-win32.whlparamiko-2.1.1-py2.py3-none-any.whl
I take the files together with the requirements.txt file and put them all into a ZIP file called Paramiko_Install_2_1_1.Zip.
4. Verification of installation
To install Paramiko in an offline environment copy all required files into one folder together with the requirements.txt file after you installed Python. Open the Windows CLI and go to the directory where the files of the Paramiko_Install_2_1_1.zip are extracted to. There insert the command:
pip install -r requirements.txt
After starting the command the installation process should look like:
After the installation is finished without errors Paramiko and Python can be used on that Windows machine.Processing c:\paramiko\pycparser-2.17.tar.gzProcessing c:\paramiko\six-1.10.0-py2.py3-none-any.whl
Processing c:\paramiko\pyasn1-0.1.9-py2.py3-none-any.whlProcessing c:\paramiko\idna-2.2-py2.py3-none-any.whlProcessing c:\paramiko\cffi-1.9.1-cp36-cp36m-win32.whlProcessing c:\paramiko\cryptography-1.7.1-cp36-cp36m-win32.whlProcessing c:\paramiko\paramiko-2.1.1-py2.py3-none-any.whlRequirement already satisfied: setuptools>=11.3 in c:\users\administrator\appdata\local\programs\python\python36-32\lib\site-packages(from cryptography==1.7.1->-r requirements.txt (line 6))Installing collected packages: six, pyasn1, idna, pycparser, cffi, cryptography, paramikoRunning setup.py install for pycparser ... doneSuccessfully installed cffi-1.9.1 cryptography-1.7.1 idna-2.2 paramiko-2.1.1 pyasn1-0.1.9 pycparser-2.17 six-1.10.0
Wow. It is such an amazing article. I am looking forward to reading more articles of yours in the future.. What American citizen need visa for Turkey ? Yes , of course all the American Citizens need a visa to visit . Because the USA is not included in the list of those countries which do not require a visa permit to visit Turkey.
ReplyDeleteYeni Perde Modelleri
ReplyDeleteSms Onay
mobil ödeme bozdurma
nft nasıl alınır
ankara evden eve nakliyat
trafik sigortası
dedektör
web sitesi kurma
aşk kitapları
Good content. You write beautiful things.
ReplyDeletehacklink
hacklink
vbet
taksi
sportsbet
vbet
sportsbet
korsan taksi
mrbahis
Thank you so much, this was really helpful!
ReplyDeletedijital kartvizit
ReplyDeletereferans kimliği nedir
binance referans kodu
referans kimliği nedir
bitcoin nasıl alınır
resimli magnet
U7İ56D
hatay
ReplyDeletekars
mardin
samsun
urfa
04T2SQ