question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pip installed wrong version of urllib3

See original GitHub issue

I am new to Pythonista and StaSh and have been trying to install Synchronator with the help of StaSh. I have been using StaSh’s pip command to install four packages:

To do so I used the following commands:

pip install -d ~/Documents/site-packages chardet
pip install -d ~/Documents/site-packages dropbox
pip install -d ~/Documents/site-packages idna
pip install -d ~/Documents/site-packages requests

Following that I had all sorts of grief. For example, when tryng to import requests from the console after killing and restarting Pythonista I got the following:

>>> import requests
/private/var/mobile/Containers/Shared/AppGroup/77E4F4DB-EDA3-49C3-8AAD-D4452754B812/Pythonista3/Documents/site-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.4) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/var/mobile/Containers/Shared/AppGroup/77E4F4DB-EDA3-49C3-8AAD-D4452754B812/Pythonista3/Documents/site-packages/requests/__init__.py", line 90, in <module>
    from urllib3.exceptions import DependencyWarning
ImportError: cannot import name 'DependencyWarning'

Did some more digging and found that StaSh had installed urllib3 version 1.4 whereas the latest version is 1.22.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ywangdcommented, Oct 29, 2017

Pythonista has requests as part of its standard distribution. You don’t need to install it. So just delete the requests and urllib3 from site-packages and restart Pythonista.

On Mon, 30 Oct 2017 at 4:25 am, Jonathan Hansford notifications@github.com wrote:

So what does pip update do?

The only urllib3 I had installed on Pythonista was the one it came with, version 1.14. My understanding is you can’t install over those modules. And how does installing version 1.4 protect anything. It is older than the original Pythonista version yet gets used in preference.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ywangd/stash/issues/279#issuecomment-340278856, or mute the thread https://github.com/notifications/unsubscribe-auth/ACPFdKgta4X_Ga8KokPrvzU_c5_rjo_Iks5sxLUfgaJpZM4QKRe8 .

                  Life is elsewhere
0reactions
Dangthrimblecommented, Oct 29, 2017

So what does pip update do? pip.py says you use update to “update an installed package”. If it manages to update a package why do you then also need to pip install the package?

The only urllib3 I had installed on Pythonista was the one it came with, version 1.14. My understanding is you can’t install over those modules. And how does installing version 1.4 protect anything. It is older than the original Pythonista version yet gets used in preference.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python Pip Installing for Wrong Version - Stack Overflow
I have both pip2. 7 installed and working and pip3. 4 installed and working (with my Python 2.7 and 3.4 versions), but my...
Read more >
Problem with "pip install" - Python Help
If you get an error with the pip install, first confirm pip is actually using the pip in your Anaconda env; pip --version...
Read more >
Changelog - pip documentation v22.3.1
Fix an issue where the output saying that a package was installed would report the old version instead of the new version during...
Read more >
urllib3 - PyPI
urllib3 can be installed with pip: $ python -m pip install urllib3 ... that can be raised from reading a socket (e.g. “bad...
Read more >
ModuleNotFoundError: No module named 'urllib3' in Python
Not having the urllib3 package installed by running pip install urllib3 . · Installing the package in a different Python version than the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found