1

I am starting to learn python, and I've been following courses using either command prompt or PyCharm.

I've been downloading packages through the command line prompt. Where can I find the installation directory and put it somewhere in PyCharm so that I don't have to download it twice?

To give an example, I just downloaded to matplotlib library using pip on the command line prompt as pip install maptlotlib. It got downloaded. When I then go to PyCharm - Setting - Python Environement, the maptlotlib package does not show up. How may I make it appear?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
m3.b
  • 447
  • 4
  • 15
  • To give an example : I just downloaded to matplotlib library using pip on the command line prompt as : pip install maptlotlib. It got downloaded. When I then go to PyCharm - Setting - Python Environement, the maptlotlib package does not show up. How may I make it appear? – m3.b Apr 29 '21 at 08:20
  • This has several issues, first you should use [a venv](https://stackoverflow.com/questions/41573587) and set that as an interpreter. Second, whatever you install using pip is cached. If you want a more permanent solution use anaconda. See [the documentation](https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html). – bad_coder Apr 29 '21 at 08:29
  • Thanks for the comments @bad_coder, but honestly I'm not sure I understand that yet. I'm just curious to know if I can see in the PyCharm setting all the packages I have installed. Because I know I can find and install packages through PyCharm, but it seems like I can't see the ones I have installed with the `pip` command line in the PyCharm's setting's window. – m3.b Apr 29 '21 at 08:49
  • I think I understand PIP caches all downloads, so I ma not too worried if I download it from PyCharm or the command line. I just want to "synchronize" my PyCharm with the PIP cache downloads, so that it shows. It might be a detail... – m3.b Apr 29 '21 at 08:57
  • Pinpointing what you want is probably [this topic](https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html#interpreter-settings) (This post also asked about 4 different questions.) – bad_coder Apr 29 '21 at 11:07
  • I did find this topic useful - The path of the downloaded package is indeed in the path written for the interpreter in PyCharm. However, this list of packages does not update, e.g., my matplotlib package does not show in this Settings - Python Interpreter window. – m3.b Apr 29 '21 at 11:17

2 Answers2

4

You need to choose this Python interpreter from PyCharm:

Settings > Project > Python interpreter.

It will show you every installed package.

Husseinfo
  • 472
  • 2
  • 9
  • To give an example : I just downloaded to matplotlib library using pip on the command line prompt as : pip install maptlotlib. It got downloaded. When I then go to PyCharm - Setting - Python Environement, the maptlotlib package does not show up. How may I make it appear? – – m3.b Apr 29 '21 at 08:21
  • Probably you are installing packages in another interpreter, you need to find it and point PyCharm to it. – Husseinfo Apr 29 '21 at 09:25
  • How do I find this interpreter then? Or the location of the downloaded files? I simply use the command prompt, and I am on Windows. – m3.b Apr 29 '21 at 10:47
1

use pip list you can get all installed package

bibo@esi09:~$ pip list
Package                Version
---------------------- --------------------
attrs                  19.3.0
Automat                0.8.0
blinker                1.4
certifi                2019.11.28
chardet                3.0.4
Click                  7.0
cloud-init             21.1
colorama               0.4.3
command-not-found      0.3
configobj              5.0.6
constantly             15.1.0
cryptography           2.8
dbus-python            1.2.16
distro                 1.4.0
distro-info            0.23ubuntu1
entrypoints            0.3
httplib2               0.14.0
hyperlink              19.0.0
idna                   2.8
importlib-metadata     1.5.0
incremental            16.10.1
Jinja2                 2.10.1
jsonpatch              1.22
jsonpointer            2.0
jsonschema             3.2.0
keyring                18.0.1
language-selector      0.1
launchpadlib           1.10.13
lazr.restfulclient     0.14.2
lazr.uri               1.0.3
MarkupSafe             1.1.0
meson                  0.53.2
more-itertools         4.2.0
netifaces              0.10.4
oauthlib               3.1.0
pexpect                4.6.0
pip                    20.3.3
pyasn1                 0.4.2
pyasn1-modules         0.2.1
Pygments               2.3.1
PyGObject              3.36.0
PyHamcrest             1.9.0
PyJWT                  1.7.1
pymacaroons            0.13.0
PyNaCl                 1.3.0
pyOpenSSL              19.0.0
pyrsistent             0.15.5
pyserial               3.4
python-apt             2.0.0+ubuntu0.20.4.4
python-debian          0.1.36ubuntu1
PyYAML                 5.3.1
requests               2.22.0
requests-unixsocket    0.2.0
SecretStorage          2.3.1
service-identity       18.1.0
setuptools             45.2.0
simplejson             3.16.0
simplelzo1x            1.1
six                    1.14.0
sos                    4.1
ssh-import-id          5.10
systemd-python         234
Twisted                18.9.0
ubuntu-advantage-tools 20.3
ufw                    0.36
unattended-upgrades    0.1
urllib3                1.25.8
vtk                    9.0.1
wadllib                1.3.3
wheel                  0.34.2
zipp                   1.0.0
zope.interface         4.7.1
WARNING: You are using pip version 20.3.3; however, version 21.1 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
bibo@esi09:~$
baodii bee
  • 41
  • 2