V
V
Vova Putsyk2016-11-28 20:31:37
linux
Vova Putsyk, 2016-11-28 20:31:37

Why are packages delivered via pip not being imported after Fedora update?

After updating fedora to version 25 in python 3 are not imported installed via pip. When I import it returns:

>>> import telebot
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.5/site-packages/telebot/__init__.py", line 23, in <module>
    from telebot import apihelper, types, util
  File "/usr/lib/python3.5/site-packages/telebot/apihelper.py", line 3, in <module>
    import requests
  File "/usr/lib/python3.5/site-packages/requests/__init__.py", line 64, in <module>
    from . import utils
  File "/usr/lib/python3.5/site-packages/requests/utils.py", line 26, in <module>
    from .compat import (
ImportError: cannot import name 'integer_types'

I removed packages and reinstalled, reinstalled pip via yum reinstall and nothing helped.
I have Python 3.5.2.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
theg4sh, 2016-12-08
@vovawed

Judging by the trace, the problem is not in the installation of telebot, but in the lack of export of integer_types to compat from the requests package.
Try updating the requests module:
At least for python3.4, the pip3.4 version of requests-2.12.3 is fine:

>>> import requests
>>>

You can also try installing a specific package version:
sudo `which pip3.4` install requests==2.12.3

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question