PyCharm doesn't recognise installed module

前端 未结 14 2274
闹比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:35

    Open python console of your pyCharm. Click on Rerun. It will say something like following on the very first line

    /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 /Applications/PyCharm.app/Contents/helpers/pydev/pydevconsole.py 52631 52632
    

    in this scenario pyCharm is using following interpretor

    /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 
    

    Now fire up console and run following command

    sudo /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 -m pip install 
    

    This should install your package :)

提交回复
热议问题