sherrez
sherrez

Reputation: 45

Running pycharm project as standalone project

Hi guys i managed to complete a python project for work in pycharm.

It has 3 python script files and a few additional imported modules/dependecies.

How do i export the project and run it on another pc via terminal by running the mainprogram.py file

e.g python mainprogram.py

Upvotes: 1

Views: 508

Answers (1)

Rahul Agrawal
Rahul Agrawal

Reputation: 315

Make a requirement.txt file which contains all the modules used in your project so if you are using virtualenv you can simply do

pip freeze > requirements.txt

Otherwise you need to do manually so that it will look like

decorator==4.3.0
defusedxml==0.5.0
entrypoints==0.2.3
Flask==1.0.2
google==2.0.1

It's just for example. So after you move to the different system you can do

pip install -r requirements.txt

to install all the modules & at the end simply run the file with

python mainprogram.py

Upvotes: 2

Related Questions