Ankur Saran
Ankur Saran

Reputation: 129

python pycharm dependency sync

I am new to Python/PYCHARM world. I am used to MAVEN in Java world. I am trying to setup environment for a open source Python project with PYCHARM and every time I run tests it shows one or other dependency is missing for import. So I am searching for a unified way to get all dependencies similar to "mvn install" does for Pycharm IDE

Version Python 2.7.12 :: Anaconda 4.2.0 (x86_64) Pycharm community Edition 2016.3.1 (Build on 14 Dec 2016)

Upvotes: 2

Views: 833

Answers (1)

Assem
Assem

Reputation: 12107

For PyCharm, you can write requirements.txt file to list all dependencies and PyCharm will suggest you to install them whenever they are not available.

pycharm suggests to install dependencies

requirements.txt should be like:

requirements.txt

Generally in python, distutils or setuptools is used to manage building resources and installing the app with his dependencies. You only need to create a setup.py file and use it like this:

python setup.py install

If you are looking to perform different commands than build and install you can use pyinvoke:

Invoke is a Python (2.6+ and 3.3+) task execution tool & library, drawing inspiration from various sources to arrive at a powerful & clean feature set.

Upvotes: 1

Related Questions