I’ve developed a Python script on MacOS and I need to deploy it to a CentOS Linux server. The problem is that server doesn’t have any internet access. I can only send over files using scp
.
I tried Python Packages Offline Installation already, but it didn’t work, I think it is because the dependencies it downloaded were somehow specifically for MacOS. This is just a hunch, but the file names had “macos” in them.
There isn’t really any code I can show as it’s a packaging issue, not the code itself. Even the setup.py
works perfectly as long as I’m using it on a machine with internet.
The other problem I have is I don’t have pip3
for some reason. I tried reinstalling python3 with different ./configure arguments, but I still don’t have it. I do have the latest version of pip
, but it’s only linked to python 2.7.
2
Answers
The only thing I can suggest in your case is to install pip for python 3.
Since the server does not have a connection you should deploy it using pip 3?
For offline usage at a different platform you have to download dependencies for the target platform:
Version 3.5 is only used here as an example.