Works fine on Bionic (18.04) as well for me:

root@b:~# python3
Python 3.6.9 (default, Apr 18 2020, 01:56:04) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests

Lets check your python3-request - 2.18.4-2ubuntu0.1 should be fine (it
is for me).

Most likely you have another python3-request  installed (e.g. through
pip or a 3rd party package) that is incompatible.

There might be nicer versions, but the following does the trick:
$ python3 -c "import sys, requests; print(sys.modules.values())" | tr ',' '\n' 
| grep requests

That should on a bionic system produce a list like:
 <module 'requests' from '/usr/lib/python3/dist-packages/requests/__init__.py'>
 <module 'requests.exceptions' from 
'/usr/lib/python3/dist-packages/requests/exceptions.py'>
 <module 'requests.__version__' from 
'/usr/lib/python3/dist-packages/requests/__version__.py'>
 <module 'requests.utils' from 
'/usr/lib/python3/dist-packages/requests/utils.py'>
 <module 'requests.certs' from 
'/usr/lib/python3/dist-packages/requests/certs.py'>
 <module 'requests._internal_utils' from 
'/usr/lib/python3/dist-packages/requests/_internal_utils.py'>
 <module 'requests.compat' from 
'/usr/lib/python3/dist-packages/requests/compat.py'>
 <module 'requests.cookies' from 
'/usr/lib/python3/dist-packages/requests/cookies.py'>
 <module 'requests.structures' from 
'/usr/lib/python3/dist-packages/requests/structures.py'>
 <module 'requests.packages' from 
'/usr/lib/python3/dist-packages/requests/packages.py'>
 <module 'requests.models' from 
'/usr/lib/python3/dist-packages/requests/models.py'>
 <module 'requests.hooks' from 
'/usr/lib/python3/dist-packages/requests/hooks.py'>
 <module 'requests.auth' from '/usr/lib/python3/dist-packages/requests/auth.py'>
 <module 'requests.status_codes' from 
'/usr/lib/python3/dist-packages/requests/status_codes.py'>
 <module 'requests.api' from '/usr/lib/python3/dist-packages/requests/api.py'>
 <module 'requests.sessions' from 
'/usr/lib/python3/dist-packages/requests/sessions.py'>
 <module 'requests.adapters' from 
'/usr/lib/python3/dist-packages/requests/adapters.py'>])

If your list points at different sources for the requests module you
need to remove it or otherwise sort this out.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1877297

Title:
  python3 requests reports RequestsDependencyWarning on import

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/requests/+bug/1877297/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to