Python pip install module is not found. How to link python to pip location?

后端 未结 10 1302
青春惊慌失措
青春惊慌失措 2020-11-27 15:37

I\'m a newbie and I needed the pySerial and feedparser module for my projects. I\'m running Mountain lion.

I followed the following tutorial so that I could upgrade

10条回答
  •  渐次进展
    2020-11-27 15:57

    Here is something I learnt after a long time of having issues with pip when I had several versions of Python installed (valid especially for OS X users which are probably using brew to install python blends.)

    I assume that most python developers do have at the beginning of their scripts:

    #!/bin/env python
    

    You may be surprised to find out that this is not necessarily the same python as the one you run from the command line >python

    To be sure you install the package using the correct pip instance for your python interpreter you need to run something like:

    >/bin/env python -m pip install --upgrade mymodule
    

提交回复
热议问题