I've Installed Pip3 but I'm unable to use pip3.2 which seems to be interfering with some packages that I install via pip3.
$ pip3 install pymysql
$ pip3 list | grep PyMySQL
PyMySQL (0.7.11)
$ python3
Python 3.2.3 (default, Mar 25 2017, 08:49:29)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymysql
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pymysql
Noticing that python3 defaults to python 3.2.3 I looked into pip3.2:
$ pip3.2 list | grep PyMySQL
Traceback (most recent call last):
File "/usr/local/bin/pip3.2", line 7, in <module>
from pip import main
File "/usr/local/lib/python3.2/dist-packages/pip/__init__.py", line 21, in <module>
from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
File "/usr/local/lib/python3.2/dist-packages/pip/_vendor/requests/__init__.py", line 66, in <module>
from .models import Request, Response, PreparedRequest
File "/usr/local/lib/python3.2/dist-packages/pip/_vendor/requests/models.py", line 856
http_error_msg = u'%s Client Error: %s for url: %s' % (self.status_code, reason, self.url)
^
SyntaxError: invalid syntax
I don't know how pip3 was installed originally but I'd like to uninstall and then reinstall using How to install pip with Python 3?.
Update
I have run $ pip uninstall pip
but pip3 still remains installed on the system.
I then ran $ sudo apt-get remove python-pip
& $ sudo apt-get remove python3-pip
but it's still installed.
What's the best way to remove pip3?