PyCharm and Pygame Help

well pycharm will ball if it can’t find a python binary. but it may look for the default system python out of the box.

you wanna find a good spot locally for your project environment - something like /home/Shadow653/dev/.virtual_environments or something. some people like them in the same root directory of the project, but it can be a hassle with git or dropbox - you don’t wanna sync your entire python environment. it’s too large and too easy to rebuild.

the benefit of using virtualenv and pip (or venv) is you can mess around with it, and if something goes bad you can blow it away and start over without harming your system python environment.

Just find a good spot, setup your env with virtualenv, use pip to update everything and in pycharm go into Settings and you can select with environment to use.

when you go to your project root, you use the ‘source’ command to locate the python binary you wanna use and it’ll drop you into that environment.

the basic answer is you can do a ‘which python’ from the terminal to see your system python part. once your virtualenv is activated, the same command should show you /home/Shadow653/dev/.virtual_environments/my_project_env/bin/python3.7/python or whatever you’ve setup.

/r/Python Thread Parent