Reputation: 11
I created a python script by pycharm (I used several libraries). I want to use this script on a Linux server. How to do it? I tried with the PyInstaller but it generates .exe
P.S Linux server is without Internet and PIP.
Thank you very much in advance
EDIT I read that is imposible and I should use WINE
Upvotes: 0
Views: 1878
Reputation: 635
It's unusual (but not unheard of) for your Linux server to be without an internet connection. (If you're doing secure batch processing, however, this might make sense.) Installing all of your script's dependant packages onto the server will be a bit tougher without internet access.
You'll need to find a packaged Python release, either in .rpm
or .deb
format (depending on your Linux distribution). Alternatively, you can compile it from source by downloading a package from the Python website and following the included compilation instructions.
You'll then probably need to get pip
to install all of your Python dependencies into an isolated directory on a server which has an internet connection, as per this answer.
As for how you get these files onto the server, that will depend on your specific circumstances. If it's connected to an intranet, you could eg. use scp to get them from another Linux machine over ssh, or if you have physical access to the machine, a USB stick might do the trick. However, given that you've managed to get 'pyinstaller' onto the machine, you may already have this sussed.
Upvotes: 1