Remote server configuration (missing modules)

Dear Pycharm community,

I'm planning to run a machine learning script consistently on one of my Google Cloud VMs.

When I configured the remote interpreter, unfortunately all the imported libraries where not recognized anymore (as they might not be installed in the virtual envoirement in the cloud). I tried to install the missing modules (for example yfinance) through the Pycharm terminal extension within my remote host connection over SSH and SFTP. So I basically chose the 188.283.xxx.xxx @username in the Pycharm terminal, and used pip3 install to install the missing modules. Unfortnately my server (due to limited ressources) collapses during the build process.
Is there a way to automatically install the needed libraries when connecting the script to the remote interpreter?
Shouldn't that be the standard procedure? And if not: does my approach make sense?

Thank you all in advance

 

Peter

1 comment
Comment actions Permalink

Hi, 

The conventional (and most basic) way is to create a file named `requirements.txt` and list all your packages/dependencies there. Then, you can install them all using `pip install -r requirements.txt`

If you have requirements file specified in [Preferences | Tools | Python Integrated Tools], PyCharm will offer to install the packages from the file automatically.

0

Please sign in to leave a comment.