Posts

Showing posts with the label pip3

ImportError: cannot import name 'main'

This is a common issue with pip3 when you try to install some package: sudo pip3 install something Traceback (most recent call last):   File "/usr/bin/pip3", line 9, in <module>     from pip import main ImportError: cannot import name 'main' To fix it just execute the following sentence: sudo python3 -m pip uninstall pip && sudo apt install python3-pip --reinstall Enjoy it!

command not found: pip3

This is a common issue. If you try to execute pip3 you probably will get: Command 'pip3' not found, but can be installed with: sudo apt install python3-pip or pip3 zsh: command not found: pip3 although you install it, anyway the same error appears To solve it, you can reinstall it: sudo apt-get remove python3-pip sudo apt-get install python3-pip or execute pip3 as python module: sudo python3 -m pip Enjoy it!

How to fix a pip3 failed installation

In my case, I was trying to install bluepy from pip3 with the following command: pip3 install bluepy But an error appears: fatal error: glib.h : No such file or directory \n #include <glib.h>\n                  ^\ncompilation terminated.\nMakefile:28: recipe for target 'bluepy-helper' failed\nmake: *** [bluepy-helper] Error 1\nmake: Leaving directory '/tmp/pip-build-djwz1adc/bluepy/bluepy'\n" ---------------------------------------- Cleaning up... Command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-djwz1adc/bluepy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-p2v5kjik-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-djwz1adc/bluepy Storing debug log for failure in /root/.pip/pip.log Usually, we see the outpu a...