When trying to run a program that requires Python 3.5 on my Ubuntu 15.10 server, I get an error whilst importing:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/requests/packages/__init__.py", line 27, in <module>
from . import urllib3
File "/usr/local/lib/python3.5/dist-packages/requests/packages/urllib3/__init__.py", line 8, in <module>
from .connectionpool import (
File "/usr/local/lib/python3.5/dist-packages/requests/packages/urllib3/connectionpool.py", line 42, in <module>
from .response import HTTPResponse
File "/usr/local/lib/python3.5/dist-packages/requests/packages/urllib3/response.py", line 3, in <module>
import zlib
ImportError: No module named 'zlib'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "bot.py", line 12, in <module>
import discord
File "/usr/local/lib/python3.5/dist-packages/discord/__init__.py", line 21, in <module>
from .client import Client
File "/usr/local/lib/python3.5/dist-packages/discord/client.py", line 43, in <module>
import requests
File "/usr/local/lib/python3.5/dist-packages/requests/__init__.py", line 58, in <module>
from . import utils
File "/usr/local/lib/python3.5/dist-packages/requests/utils.py", line 26, in <module>
from .compat import parse_http_list as _parse_list_header
File "/usr/local/lib/python3.5/dist-packages/requests/compat.py", line 7, in <module>
from .packages import chardet
File "/usr/local/lib/python3.5/dist-packages/requests/packages/__init__.py", line 29, in <module>
import urllib3
File "/usr/local/lib/python3.5/dist-packages/urllib3/__init__.py", line 8, in <module>
from .connectionpool import (
File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 42, in <module>
from .response import HTTPResponse
File "/usr/local/lib/python3.5/dist-packages/urllib3/response.py", line 3, in <module>
import zlib
ImportError: No module named 'zlib'
The program itself only works with 3.5, otherwise I'd be using 3.4. Anywho, when attempting to use 3.4, there's no problems. The packages that contain zlib are installed, and they work fine with python3.4.
It might be a configuration problem, but if someone could shine some light on this, I'd really appreciate it.
EDIT
ii libpython3.5-minimal:amd64 3.5.0-3
amd64 Minimal subset of the Python language (version 3.5)
ii libpython3.5-stdlib:amd64 3.5.0-3
amd64 Interactive high-level object-oriented language (standard library, version 3.5)
ii python3.5 3.5.0-3
amd64 Interactive high-level object-oriented language (version 3.5)
ii python3.5-minimal 3.5.0-3
amd64 Minimal subset of the Python language (version 3.5)
EDIT 2
ii zlib1g:amd64 1:1.2.8.dfsg-2ubuntu4 amd64 compression library - runtime
ii zlib1g-dev:amd64 1:1.2.8.dfsg-2ubuntu4 amd64 compression library - development