For managing project dependencies, Node.js has
package.json files, PHP has
composer.json files. Fulfilling a similar need, Python has
pip and virtual environments, but they don't work quite like
The basic idea is that for each Python project, you define a virtual environment that harbors all the project's python dependencies.
The easiest way to go about things assuming your have
virtualenvwrapper installed on your system is as follows:
$ mkdir ~/Dev/MyProject
$ mkvirtualenv MyProject
The actual virtual environment will be in
$ workon MyProject
$ pip install <whatever>
without an argument.
$ mkvirtualenv -p /usr/bin/python3 MyProject
When you want to deploy your project on another machine, you will want the environment on the host to use the same versions of the packages you used while developing it (i.e., those in your virtual environment). The process of generating a list of those packages and re-installing them is discussed in this this post from Miguel Grinberg's blog and in this Stack Overflow post.
Virtual environments present an added layer of complexity when using IDEs. To have the project run within the right environment and to get accurate auto completion and the like, the IDE needs somehow to be aware of the virtual environment it should use. Note that this might be a different environment than the one under which the IDE itself is preferred to run.
Each IDE is different, so generalized help is tricky. It might work to run the IDE from a shell that has its virtual environment set as desired, but this will run the IDE itself within that environment as well, which may not be what you want.