IntelliJ IDEA 12: How can I run pip install to install libraries in a virtual environment?

I am using IntelliJ IDEA 12 Ultimate Edition and am creating a flask project.

I created virtualenv using IDEA and used it, but my code has a dependency on other libraires that I am promoting. For example, Flask-Restless.

My code in IntelliJ IDEA looks like

enter image description here

Is there a way to install Flak-Restless using IntelliJ IDEA 12?

or

Do I need to activate my virtualenv on the command line and install it myself?

Could this provide me with IDEA?

+7
source share
3 answers

IntelliJ IDEA use Tools | Manage Python dialog boxes to install / uninstall packages for your Python SDK or virtualenv used in the project.

+11
source

Use pip requirements.txt in the root of the repository. My PyCharm automatically asks me to install the missing requirements or if the installed versions are not equal to requirements.txt .

You can install packages from requirements.txt :

 your_python_root_pip install -r requirements.txt 

You can get already installed packages with versions:

 your_python_root_pip freeze -r requirements.txt 

For more information, see Help Help. requirements.txt example:

 flask==0.9 flask-testing==0.4 blinker==1.2 uwsgi==1.4.5 nose coverage pep8 
+4
source

You can install all project packages using PyCharm 2017.1 using Tools / Python Integrated Tools / Package Requirements File . Get the full path to your requirements.txt file, and PyCharm will ask you to install all the dependencies.

0
source

All Articles