3

I'm quite new on this Python world (i worked in the past with java, c++... but I never used Python).

Well, let's go with the question.

As I know, when I needed to export a java project, I just needed to create a .war (automaticly if I used Eclipse) and use it whenever and wherever I need it...

Now, I need to export a python project created in pyCharm and use it in other computers (it's a linux program created for getting information of the system and display it through sockets in a server), but I don't know what steps should I follow to export this project and use it on other machines.

My project looks like this:

+ProjectRootDir
    +Package
      -File.py (modules uses in main)
    +MainPackage
      -Main.py
+ExternalLibraries (I understand that I will need 
    to install them manually on the other computers).

Maybe is a stupid question, but I researched through manuals and other questions but I don't find the answer...

Any idea?

Regards!

Tester2000
  • 31
  • 1
  • 1
  • 2
  • 1
    I realise that you're specifically asking about PyCharm (which I know nothing about) but in general you may want to check out some basic information on Python packaging. https://packaging.python.org/tutorials/distributing-packages/ – orangeInk Aug 25 '17 at 09:35
  • I wiil read that article... But I don't think that is what I am asking for... – Tester2000 Sep 01 '17 at 09:38

1 Answers1

2

Generally speaking, if you just want to work on a different machine you just have to copy your Python project's RootDir, create new project in PyCharm, add the folder to it and install all dependencies.

This is however made easier by:

a) setting up your project as a python package (see my comment) as this allows you to define dependencies which will automatically be installed and

b) the use of virtual environments which can be exported and installed on a different machine, see https://docs.python.org/3/tutorial/venv.html

Personally I use conda (https://conda.io/miniconda.html) to manage my environments: https://conda.io/docs/user-guide/tasks/manage-environments.html

orangeInk
  • 1,360
  • 8
  • 16