mirko / SonOTA

Flashing Itead Sonoff devices with custom firmware via original OTA mechanism
GNU General Public License v2.0
717 stars 105 forks source link

pip3 fails to import main #171

Open artmg opened 4 years ago

artmg commented 4 years ago

On both Raspbian and Ubuntu, with python versions 3.5 and 3.6, after executing pip3 install --user -r requirements.txt I find that I cannot use pip3 successfully.

$ pip3 install --user -r requirements.txt
Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip import main
ImportError: cannot import name 'main'

This is apparently a known issue on Debian-based systems, due to the different ways that the OS and pip install binaries – see. https://stackoverflow.com/q/49836676 – the workaround I used was to prepend the pip3 command thus:

~/.local/bin/pip3

With this workaround the issue goes away. I doubt it is within the remit of this project to do anything to rectify the issue, but perhaps if people come across this problem it might be worth having a workaround in the documentation.