How to make system python to find modules installed via pip?

Roby

I have two versions of python, /usr/bin/python (version 2.7.10 in MacOS ) & /usr/local/bin/python(version 2.7.13 installed via brew).

I use pip (installed by brew install python )to install a module protobuf!

but /usr/bin/python cannot find the module protobuf,whereas the /usr/local/bin/python could find it.

how can I make the /usr/bin/python to find the module

update

@RNB according to the installation, sudo python get-pip.py I have errors like

:Collecting pip
  Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 640kB/s 
Collecting wheel
  Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB)
    100% |████████████████████████████████| 71kB 6.3MB/s 
Installing collected packages: pip, wheel
  Found existing installation: pip 8.1.2
    Uninstalling pip-8.1.2:
      Successfully uninstalled pip-8.1.2
  Rolling back uninstall of pip
Exception:
Traceback (most recent call last):
  File "/tmp/tmpW2v8kJ/pip.zip/pip/basecommand.py", line 215, in main
  .....
    File"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 235, in _compile
    cachekey = (type(key[0]),) + key
RuntimeError: maximum recursion depth exceeded while calling a Python object

solution

according to @RNB's advice, first clean all pip packages,uninstall brew python+pip, install pip for sys's python by python get-pip.py, maybe it gives error with wheel, so set options --no-setuptools&--no-wheel for python get-pip.py,install or upgrade setuptools & wheel via pip.At last install protobuf,problem solved!

RNB

You will have to install pip for /usr/bin/python and install protobuf via your new pip installation.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to determine which python modules were installed with `pip` and which with `apt`?

From Dev

How do I detect and remove Python packages installed via pip?

From Dev

Can't load Python modules installed via pip from site-packages directory

From Dev

Python can't see modules installed with pip

From Dev

How to make Python see module installed via apt?

From Dev

Installed Django with Pip but Python cant find it

From Dev

How to find if less is installed on the system?

From Dev

Should we let Python pip overwrite modules that were installed by RPM?

From Dev

How to make python setuptools find top level modules

From Dev

Can't find modules installed via virtualenv on windows

From Dev

How to import custom module the same way as pip-installed modules?

From Dev

How to update a Python package which was installed by pip

From Dev

intellij unable to recognise python imports installed via pip

From Dev

intellij unable to recognise python imports installed via pip

From Dev

module installed on python 2.7 instead of 3.5 via pip

From Dev

Why pip search can't find certain packages while they can be installed via pip install anyway

From Dev

Cannot install modules via pip running on python 3.4

From Dev

How to make cmake find installed packages

From Dev

Unable to find executable of python module installed by pip on Mac OSX

From Dev

pip install doesn't find my highest installed version of python

From Dev

Django can't find locally-installed Python modules

From Dev

MAVProxy installed by Python can't find required modules

From Dev

Python does not find custom installed modules when running from a cronjob

From Dev

I have python 2.7 and 3.6 installed on my mac. How to find the version of pip associated with Python3?

From Dev

How to configure VSCode to find yarn v2 installed modules

From Dev

pip with venv shows many modules installed

From Dev

My package installed with pip install shows no modules

From Dev

pip with venv shows many modules installed

From Dev

How do I refer to packages installed via pip in a virtual enviroment in INSTALLED_APPS?

Related Related

  1. 1

    How to determine which python modules were installed with `pip` and which with `apt`?

  2. 2

    How do I detect and remove Python packages installed via pip?

  3. 3

    Can't load Python modules installed via pip from site-packages directory

  4. 4

    Python can't see modules installed with pip

  5. 5

    How to make Python see module installed via apt?

  6. 6

    Installed Django with Pip but Python cant find it

  7. 7

    How to find if less is installed on the system?

  8. 8

    Should we let Python pip overwrite modules that were installed by RPM?

  9. 9

    How to make python setuptools find top level modules

  10. 10

    Can't find modules installed via virtualenv on windows

  11. 11

    How to import custom module the same way as pip-installed modules?

  12. 12

    How to update a Python package which was installed by pip

  13. 13

    intellij unable to recognise python imports installed via pip

  14. 14

    intellij unable to recognise python imports installed via pip

  15. 15

    module installed on python 2.7 instead of 3.5 via pip

  16. 16

    Why pip search can't find certain packages while they can be installed via pip install anyway

  17. 17

    Cannot install modules via pip running on python 3.4

  18. 18

    How to make cmake find installed packages

  19. 19

    Unable to find executable of python module installed by pip on Mac OSX

  20. 20

    pip install doesn't find my highest installed version of python

  21. 21

    Django can't find locally-installed Python modules

  22. 22

    MAVProxy installed by Python can't find required modules

  23. 23

    Python does not find custom installed modules when running from a cronjob

  24. 24

    I have python 2.7 and 3.6 installed on my mac. How to find the version of pip associated with Python3?

  25. 25

    How to configure VSCode to find yarn v2 installed modules

  26. 26

    pip with venv shows many modules installed

  27. 27

    My package installed with pip install shows no modules

  28. 28

    pip with venv shows many modules installed

  29. 29

    How do I refer to packages installed via pip in a virtual enviroment in INSTALLED_APPS?

HotTag

Archive