Forums

More MySQL and Django1.6/Py3.3 trouble - can't seem to install connector

Hey everyone,

So I've driven myself crazy searching for answers to this one. I am trying to install the MySQL connector for Django1.6 with Python3.3. I've looked at previous threads on the issue and the wiki here. Both have recommended the following command:

pip3.3 install --user https://github.com.davispuh/MySQL-for-Python-3/archive/1.0.tar.gz

Unfortunately, I get the following after entering that.

Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.3/dist-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 475, in urlopen
conn = self._get_conn(timeout=pool_timeout)
File "/usr/local/lib/python3.3/dist-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 217, in _get_conn
return conn or self._new_conn()
File "/usr/local/lib/python3.3/dist-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 660, in _new_conn
return self._prepare_conn(conn)
File "/usr/local/lib/python3.3/dist-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 625, in      _prepare_conn
conn.connect()
File "/usr/local/lib/python3.3/dist-packages/pip/_vendor/requests/packages/urllib3/connection.py", line 156, in connect
self._tunnel()
File "/usr/lib/python3.3/http/client.py", line 804, in _tunnel
message.strip()))
OSError: Tunnel connection failed: 403 Forbidden


During handling of the above exception, another exception occurred:


Traceback (most recent call last):
 File "/usr/local/lib/python3.3/dist-packages/pip/_vendor/requests/adapters.py", line 330, in send
 timeout=timeout
 File "/usr/local/lib/python3.3/dist-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 528, in urlopen
 'Socket error: %s.' % e)
pip._vendor.requests.packages.urllib3.exceptions.ProxyError: Cannot connect to proxy. Socket error: Tunnel connection failed: 403 Forbidden.


During handling of the above exception, another exception occurred:


Traceback (most recent call last):
File "/usr/local/lib/python3.3/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/local/lib/python3.3/dist-packages/pip/commands/install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/local/lib/python3.3/dist-packages/pip/req.py", line 1197, in prepare_files
do_download,
File "/usr/local/lib/python3.3/dist-packages/pip/req.py", line 1375, in unpack_url
self.session,
File "/usr/local/lib/python3.3/dist-packages/pip/download.py", line 546, in unpack_http_url
resp = session.get(target_url, stream=True)
File "/usr/local/lib/python3.3/dist-packages/pip/_vendor/requests/sessions.py", line 395, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.3/dist-packages/pip/download.py", line 237, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/local/lib/python3.3/dist-packages/pip/_vendor/requests/sessions.py", line 383, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.3/dist-packages/pip/_vendor/requests/sessions.py", line 486, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.3/dist-packages/pip/_vendor/requests/adapters.py", line 381, in send
raise ProxyError(e)
pip._vendor.requests.exceptions.ProxyError: Cannot connect to proxy. Socket error: Tunnel connection failed: 403 Forbidden.


Storing debug log for failure in /home/indomitamors/.pip/pip.log

Of course, that's not what I'm looking for. Looks like it might just be a problem on my side, maybe connection? Could someone help me out here?

Hi there -- is

pip3.3 install --user https://github.com.davispuh/MySQL-for-Python-3/archive/1.0.tar.gz

...exactly what you're typing? I ask because it looks like there's a typo, the dot before davispuh should probably be a slash.

Update: nowadays, the library for Python 3 has changed. If you're not using a virtualenv, then the right library should already be installed. If you are using a virtualenv, then you can install the correct package by running this from a bash console (inside the virtualenv):

pip install mysqlclient