Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyCharm: Cannot keep interpreters the same on two different computers when accessing same project

I regularly switch between computers to work on the same project. It has become a headache to have separate interpreters updated with modules installed on my two machines even though both computers can access the net drive where python.exe is placed.

When I try to set the interpreter from my second computer to the same used by my primary computer, I keep getting an Invalid Python SDK error:

enter image description here

Currently the system python version is 3.9.1. Maybe I should uninstall this and install python3.6?

enter image description here

I am using Win10 64bit on both computer. My main computer has Intel i5, and my secondary computer (problem) has two Intel Xeon. I have seen posts that suggested edit the PYTHONPATH but do not know where to access it in Win10 so please be specific with the OS.

like image 685
Stack_Protégé Avatar asked May 11 '26 04:05

Stack_Protégé


1 Answers

Do you really need to share an interpreter between the two machines? This seems like a very unusual idea.

"I regularly switch between computers to work on the same project." - this is very common that multiple people work over the same project and instead sharing interpreter, they use specific tools to manage modules and dependencies. I think that you can do the same.

The best way is to use something more sophisticated than the plain requirements.txt - you can check out pipenv which is supported by PyCharm: https://realpython.com/pipenv-guide/

Then, you can store pipenv artifacts on your gir repo (you have it, right?) and update packages with a few commands which is described in the above link.

like image 85
tpwo Avatar answered May 12 '26 19:05

tpwo