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:
whl
file. whl
file to the windows server machine. 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 (eg, I am searching for a library named beautifulsoup4
link )
You need to select Download Files
from the side menu. eg,
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.