I want to use Airflow package extras s3
and postgres
in PyCharm but do not know how to install them (on macOS Sierra).
Airflow itself can be installed from Preferences > Project > Project interpreter > + but not the extras as far as I can work out.
The extras can be installed with pip
in the terminal using
$ pip install airflow[s3,postgres]
but they end up in a different interpreter (~/anaconda
) than the one used by PyCharm (/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7
).
Checking the Python executables in my /usr/local/bin
directory I found that only pip3
and pip3.5
point to the PyCharm interpreter, but pip
, pip2
, pip2.7
do not.
$ ls -la /usr/local/bin | grep pip
-rwxr-xr-x 1 root admin 204 Dec 21 11:41 pip
-rwxr-xr-x 1 root admin 204 Dec 21 11:41 pip2
-rwxr-xr-x 1 root admin 204 Dec 21 11:41 pip2.7
lrwxr-xr-x 1 christofer admin 34 Nov 21 11:53 pip3 -> ../Cellar/python3/3.5.2_3/bin/pip3
lrwxr-xr-x 1 christofer admin 36 Nov 21 11:53 pip3.5 -> ../Cellar/python3/3.5.2_3/bin/pip3.5
Browsing the directory of the PyCharm interpreter I found all the expected python executables (python
, python2.7
etc.) pointed to from /usr/local/bin
but no pip
.
So, the problem could be solved if I/you/we can figure out either
airflow[s3,postgres]
from within PyCharm, orpip install airflow[s3,postgres]
pointing to the PyCharm interpreter.So, the problem could be solved if I/you/we can figure out either
how to install airflow[s3,postgres] from within PyCharm, or
how to run pip install airflow[s3,postgres] pointing to the PyCharm interpreter.
Or maybe?:
~/anaconda
Python to PycharmTo add another python interpreter to Pycharm goto:
File -> Settings -> Project: -> Project Interpreter
Press the Gear Button and select more
:
This shows all of the interpreters configured. Select the +
button, and select add local
:
Now you should be able to add your anaconda Python to Pycharm. You can then select which Python to use as primary for the project, and you can select which Python to run under:
Run -> Edit Configurations
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With