PyCharm doesn't recognise installed module

前端 未结 14 2281
闹比i
闹比i 2020-12-03 06:55

I\'m having trouble with using \'requests\' module on my Mac. I use python34 and I installed \'requests\' module via pip. I can verify this via running installation again an

14条回答
  •  抹茶落季
    2020-12-03 07:41

    1. If you go to pycharm project interpreter -> clicked on one of the installed packages then hover -> you will see where pycharm is installing the packages. This is where you are supposed to have your package installed.

    2. Now if you did sudo -H pip3 install pip3 installs it to different directory which is /usr/local/lib/site-packages

    since it is different directory from what pycharm knows hence your package is not showing in pycharm.

    Solution: just install the package using pycharm by going to File->Settings->Project->Project Interpreter -> click on (+) and search the package you want to install and just click ok.

    -> you will be prompted package successfully installed and you will see it pycharm.

提交回复
热议问题