Issues with using pip3 to install python packages

PYNQ v2.4


So I was trying to run an ipynb project that utilies the fir library. I don’t have the fir library so I used
the instruction sudo pip3 install fir through the ipynb terminal, but it ran unsuccesfully. I noticed that I am having this issue with any python package that i try to install. Is there something wrong with my pynq image? I am able to run python code and load libraries that I have.

I received the error below for the instruction sudo pip3 install fir :

Collecting fir
Traceback (most recent call last):
** File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/”, line 138, in _new_conn**
** (, self.port), self.timeout, extra_kw)
** File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/util/”, line 75, in create_connection**
** for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):**
** File “/usr/lib/python3.6/”, line 745, in getaddrinfo**
** for res in _socket.getaddrinfo(host, port, family, type, proto, flags):**
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
** File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/”, line 594, in urlopen**
** chunked=chunked)**
** File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/”, line 350, in _make_request**
** self._validate_conn(conn)**
** File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/”, line 837, in _validate_conn**
** conn.connect()**
** File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/”, line 281, in connect**
** conn = self._new_conn()**
** File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/”, line 147, in _new_conn**
** self, “Failed to establish a new connection: %s” % e)**
requests.packages.urllib3.exceptions.NewConnectionError: <requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fa96d00f0>:

Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
** File “/usr/lib/python3/dist-packages/pip/”, line 215, in main**
** status =, args)**
** File “/usr/lib/python3/dist-packages/pip/commands/”, line 353, in run**
** File “/usr/lib/python3/dist-packages/pip/”, line 749, in build**
** self.requirement_set.prepare_files(self.finder)**
** File “/usr/lib/python3/dist-packages/pip/req/”, line 380, in prepare_files**
** ignore_dependencies=self.ignore_dependencies))**
** File “/usr/lib/python3/dist-packages/pip/req/”, line 554, in _prepare_file**
** require_hashes**
** File “/usr/lib/python3/dist-packages/pip/req/”, line 278, in populate_link**
** = finder.find_requirement(self, upgrade)**
** File “/usr/lib/python3/dist-packages/pip/”, line 465, in find_requirement**
** all_candidates = self.find_all_candidates(**
** File “/usr/lib/python3/dist-packages/pip/”, line 423, in find_all_candidates**
** for page in self._get_pages(url_locations, project_name):**
** File “/usr/lib/python3/dist-packages/pip/”, line 568, in _get_pages**
** page = self._get_page(location)**
** File “/usr/lib/python3/dist-packages/pip/”, line 683, in _get_page**
** return HTMLPage.get_page(link, session=self.session)**
** File “/usr/lib/python3/dist-packages/pip/”, line 792, in get_page**
** “Cache-Control”: “max-age=600”,**
** File “/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/”, line 501, in get**
** return self.request(‘GET’, url, kwargs)
** File “/usr/lib/python3/dist-packages/pip/”, line 386, in request**
** return super(PipSession, self).request(method, url, args, kwargs)
** File “/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/”, line 488, in request
** resp = self.send(prep, send_kwargs)
** File “/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/”, line 609, in send**
** r = adapter.send(request, kwargs)
** File “/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/”, line 47, in send**
** resp = super(CacheControlAdapter, self).send(request, kw)
** File “/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/”, line 423, in send**
** timeout=timeout**
** File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/”, line 643, in urlopen**
** _stacktrace=sys.exc_info()[2])**
** File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/util/”, line 315, in increment**
** total -= 1**
TypeError: unsupported operand type(s) for -=: ‘Retry’ and 'int’

This looks like a connection problem. Is your board connected to the internet?


So I connected the ethernet port on my ZCU102 to the computer. I assumed that the directions on how to connect to the Jupyter Notebook set the board up with internet connection. Do I have to separately enable internet access on the board?

No, this is perhaps the easiest way to connect to your board, but your computer won’t automatically share a network connection.

If you have access to one, you can connect the board directly to a router/switch. You would need to figure out the IP assigned to the board from the router, and use it to connect from your computer.


That makes sense! However I am limited to connecting it directly to the computer, but I would just have to figure out a way to bridge that connection to an internet connection just like the documentation stated right?

Yes, you can try bridge from your host computer. I’d suggest you just google how to do this for the OS you are using - it isn’t really anything to do with PYNQ - you don’t need to change settings on your board.