Talking about server then it usually run Linux,the a .exe wont work.
What is your server running?
Usually when i transfer Python code to a server it's for running a web-app.
The i also has a Repo eg GitHub,BitBucket.
Example DigitalOcean VPS have a Linux distro running eg Ubuntu(Droplet) that has Python and Git pre-installed.
Transfer code to server
On local Pc i have also build code with virtual environment.
Then
At this point i could run a script
With a web-app there as more step like eg setting up Gunicorn,Nginx,so other can see web-app in browser.
What is your server running?
Usually when i transfer Python code to a server it's for running a web-app.
The i also has a Repo eg GitHub,BitBucket.
Example DigitalOcean VPS have a Linux distro running eg Ubuntu(Droplet) that has Python and Git pre-installed.
Transfer code to server
git clone my_repo
.On local Pc i have also build code with virtual environment.
Then
pip install -r requirements.txt
to install dependencies to server.At this point i could run a script
python my_scipt.py
on server.With a web-app there as more step like eg setting up Gunicorn,Nginx,so other can see web-app in browser.