Jon Evans
Jon Evans

Reputation: 435

Share a PyCharm project across multiple operating systems (different interpreter paths)

I have just gotten in to using PyCharm. I spend half my time on a Windows machine and the other half on Linux. I have been using Dropbox to sync my projects between the two (in addition to version control). This mostly works fine, except each time I switch operating systems, I have to reset the PyCharm project interpreter, because the paths for the two operating systems are different.

Is my only option to have two different working copies, one for each operating system (i.e. stop using Dropbox for PyCharm projects)? Or, is there some way to get PyCharm to use multiple Python interpreters and fall-back on one that works, so that I can store both the Windows and the Linux configuration in a single PyCharm project file and have it work automatically?

Upvotes: 28

Views: 7098

Answers (1)

yole
yole

Reputation: 97133

Use the "Edit" button in Settings | Python Interpreters on both machines to rename the interpreter to something that doesn't include the full path ("Python 2.7" for example). The project file stores the name of the interpreter, not the path, so this will allow the project file to reference the same interpreter on both machines.

Upvotes: 21

Related Questions