Title: IntelliJ IDEA 12: How can I run pip install to install libraries in virtual environment?
Tags: intellij-idea;flask;pycharm
Question: I am using IntelliJ IDEA 12 Ultimate Edition and creating flask project.
I created the virtualenv using IDEA and using that, but my code has dependency on other libraires I as move forward. For example Flask-Restless.
My code in IntelliJ IDEA looks like
Is there a way to install Flak-Restless using IntelliJ IDEA 12?
do I need to activate my virtualenv on command-line and install it myself?
Is it something IDEA can provide to me?


Here is another answer: Use pip requirements.txt in your repository root. My PyCharm automatically prompt me install absent requirements or if installed versions not equal with 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 details see pip help. See requirements.txt example:
flask==0.9
flask-testing==0.4
blinker==1.2
uwsgi==1.4.5
coverage
Comment for this answer: but you run pip install from command-line, right? I am more interested if IDEA doesn't find any library and suggest to install it in the IDE using `pip install` rather me leaving IDE and install from command-line
Comment for this answer: See PyCharm roadmap: http://confluence.jetbrains.com/display/PYH/PyCharm+2.5+Roadmap. See details about `dependencies management`, `suggest to install or update required libraries`, `distutils / PyPI support` and etc. In PyCharm it supported by default, for IDEA you probaly must install someone plugin.

Here is another answer: In IntelliJ IDEA use Tools | Manage Python Packages dialog to install/uninstall packages for your Python SDK or virtualenv used in project.

Here is another answer: You can install all project packages via PyCharm 2017.1 by Tools / Python Integrated Tools / Package requirements file. Get there full path to your requirements.txt file and PyCharm will ask you to install all dependencies.
Comment for this answer: How do I get "Python Integrated Tools" to appear in the Tools menu?

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 3, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2013:00:03/17/13', 'FavoriteCount': 2.0, 'PostTypeId': 1, 'Tags': '<intellij-idea><flask><pycharm>', 'Title': 'IntelliJ IDEA 12: How can I run pip install to install libraries in virtual environment?', 'ViewCount': 14090, 'id': 15463080, 'user_AboutMe': '<p>Hello Viewer,</p>\n<p>Some of the places to see my work are</p>\n<ul>\n<li><a href="https://bonsaiilabs.com" rel="nofollow noreferrer">BonsaiiLabs</a></li>\n<li><a href="https://www.harit.dev/" rel="nofollow noreferrer">My Website</a></li>\n</ul>\n', 'user_AccountId': 159676.0, 'user_DisplayName': 'daydreamer', 'user_Reputation': 82357.0, 'user_Views': 3589.0, 'user_id': 379235.0}}