pip estaba bien, pero hoy cuando intenté usarlo, recibí este mensaje:
-bash: pip: command not found
Eso es raro. brewmuestra que el pythonpaquete de brewtodavía está instalado, pero ahora al escribir pythonen la terminal se ejecutará el predeterminado en el sistema:
~: brew install python
Warning: python 2.7.13_1 is already installed
~: python
Python 2.7.10 (default, Feb 7 2017, 00:08:15)
Intentar importar los paquetes que tenía no funcionó tan bien:
~: python
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named cv2
>>> import PIL
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named PIL
Si entro /usr/local/lib/python2.7/site-packages/, todo parece estar bien. Curiosamente también funciona si escribo
~: pip2 -V
pip 9.0.1 from /usr/local/lib/python2.7/site-packages (python 2.7)
~: python2
Python 2.7.13 (default, Jul 18 2017, 09:17:00)
>>> import cv2
>>>
¿Qué puedo hacer para recuperar pip(y mis paquetes)?
pythonen la terminal.
1.
~: python), python 2.7.13 es el Python instalado con brew!