You are not logged in.
I get the following error whenever I want to open a Python application such as qutebrowser and buku or pip.
Traceback (most recent call last):
File "/usr/bin/buku", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 49, in <module>
from pkg_resources.extern import six
File "/usr/lib/python3.6/site-packages/pkg_resources/extern/__init__.py", line 61, in load_module
"distribution.".format(**locals())
ImportError: The 'six' package is required; normally this is bundled with this package so if you get this warning, consult the packager of your distribution.I've tried reinstaling python-six but it did not help.
For instance, running Dropbox (for the first time) becomes impossible (can't open qutebrowser) :
https://i.imgur.com/TdST9PM.png
I think it happened right after I installed a few applications (namely mycli, buku and cheat) from PyPi using pip (rather than from AUR).
Please help me with that.
Last edited by ewaller (2017-09-03 15:05:54)
Offline
Hello,
First, please do not post large pictures in support threads, especially not pictures of text. Post the text instead. I will be editing your post to change the image tags to link tags. https://wiki.archlinux.org/index.php/Co … s_and_code
On my system:
ewaller@turing ~ 1307 %python
Python 3.6.2 (default, Jul 20 2017, 03:52:27)
[GCC 7.1.1 20170630] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os.path
>>> import six
>>> print (os.path.abspath(six.__file__))
/usr/lib/python3.6/site-packages/six.py
>>>
ewaller@turing ~ 1308 %pacman -Qo /usr/lib/python3.6/site-packages/six.py
/usr/lib/python3.6/site-packages/six.py is owned by python-six 1.10.0-3
ewaller@turing ~ 1309 %pacman -Qi python-six
Name : python-six
Version : 1.10.0-3
Description : Python 2 and 3 compatibility utilities
Architecture : any
URL : http://pypi.python.org/pypi/six/
Licenses : MIT
Groups : None
Provides : None
Depends On : python
Optional Deps : None
Required By : python-astroid python-cryptography python-cycler python-dateutil python-mock
python-packaging python-prompt_toolkit
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 81.00 KiB
Packager : Felix Yan <felixonmars@archlinux.org>
Build Date : Sat 24 Dec 2016 01:48:36 AM PST
Install Date : Sat 07 Jan 2017 08:58:03 AM PST
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature
ewaller@turing ~ 1310 %So, you might try installing python-six.
Using PIP instead of pacman is not recommended; doing so deprives your PACkage MANager of the visibility of what is installed in your system. Most of those you listed are available in the AUR.
Also, your mime stuff looks really confused. xdg-open seems to be looking for a browser; do you not have any one of those installed?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
First, please do not post large pictures in support threads, especially not pictures of text. Post the text instead. I will be editing your post to change the image tags to link tags. https://wiki.archlinux.org/index.php/Co … s_and_code
OK. I'm sorry about that.
So, you might try installing python-six.
Done many times. It doesn't help with getting rid of the error.
Using PIP instead of pacman is not recommended; doing so deprives your PACkage MANager of the visibility of what is installed in your system. Most of those you listed are available in the AUR.
OK. I will consider it the next time. AUR over PyPI.
Also, your mime stuff looks really confused. xdg-open seems to be looking for a browser; do you not have any one of those installed?
No, I use just qutebrowser as my web browser.
---
python-six, as well as python2-six are installed on my machine:
umai# python
Python 3.6.2 (default, Jul 20 2017, 03:52:27)
[GCC 7.1.1 20170630] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os.path
>>> import six
>>> print (os.path.abspath(six.__file__))
/usr/lib/python3.6/site-packages/six.py
>>> umai# pacman -Qo /usr/lib/python3.6/site-packages/six.py
/usr/lib/python3.6/site-packages/six.py is owned by python-six 1.10.0-3umai# pacman -Qi python-six
Name : python-six
Version : 1.10.0-3
Description : Python 2 and 3 compatibility utilities
Architecture : any
URL : http://pypi.python.org/pypi/six/
Licenses : MIT
Groups : None
Provides : None
Depends On : python
Optional Deps : None
Required By : python-packaging
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 81.00 KiB
Packager : Felix Yan <felixonmars@archlinux.org>
Build Date : Sat 24 Dec 2016 01:48:36 PM +04
Install Date : Sun 03 Sep 2017 09:23:27 AM +04
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : SignatureLast edited by Chinggis6 (2017-09-03 17:53:50)
Offline
Oh. I re-read your first post, and it appears that buku is trying to import six from /usr/lib/python3.6/site-packages/pkg_resources/extern/
On Arch, that is not where six.pyc is. It will be located in /usr/lib/python3.6/site-packages/six.py
Unfortunately, buku is the one that is not in the AUR. The best solution is going to be to edit the buku source files to import from the proper location. Alternately, a lazy and NOT recommended way to solve this would be to create soft links from resources/extern back to the actual six.py file. This might be the way I would test that it works, but I would not leave it that way. In an ideal world, you would create and share an package for buku that modifies the source to work with the Arch Linux structure.
Last edited by ewaller (2017-09-03 18:18:00)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Oh. I re-read your first post, and it appears that buku is trying to import six from /usr/lib/python3.6/site-packages/pkg_resources/extern/
On Arch, that is not where six.pyc is. It will be located in /usr/lib/python3.6/site-packages/six.py
It should work, though. I believe pkg_resource.extern simply provides references to the packages which were loaded by pkg_resource.
% python
Python 3.6.2 (default, Jul 20 2017, 03:52:27)
[GCC 7.1.1 20170630] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pkg_resources.extern import six
>>> six
<module 'six' from '/usr/lib/python3.6/site-packages/six.py'>
>>> Edit: Just tried in in a virtual env, and it worked perfectly with pip install (I already had all packages except requests and buku from pacman)
progandy@pamobile /tmp % python -m venv /tmp/test
progandy@pamobile /tmp % source ./test/bin/activate
progandy@pamobile /tmp % pip install requests buku
Collecting requests
Using cached requests-2.18.4-py2.py3-none-any.whl
Collecting buku
Using cached buku-3.2.tar.gz
[...]
Successfully installed buku-3.2 certifi-2017.7.27.1 chardet-3.0.4 idna-2.6 requests-2.18.4 urllib3-1.22
progandy@pamobile /tmp % buku
usage: buku [OPTIONS] [KEYWORD [KEYWORD ...]]
Powerful command-line bookmark manager. Your mini web!
[...]
Webpage: https://github.com/jarun/Buku
1 progandy@pamobile /tmp % rm -r /tmp/test Edit: Can you try to reinstall python-setuptools? Did you set any environment variables for python? Are there any problems reported with python packages by pacman?
$ env | grep -i python
$ LC_ALL=C pacman -Qkk | grep -v ", 0 altered"Last edited by progandy (2017-09-03 21:59:32)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
Unfortunately, buku is the one that is not in the AUR.
buku and buku-git are in the AUR.
I think it all happened when I did:
pip install -r pypi.reqa file which I created myself to contain the three packages mentioned (buku, mycli, cheat); after completing a fresh Arch Linux install on the machine.
Now, python applications are rendered useless. Even if I uninstall buku.
It is the second time I am coming across this very error. This time on another, completely different machine.
I don't want to re-format Arch this time, what I had to do the first time.
I also have reported the issue on bugs.archlinux.org but the task was closed due not being in a nature of a bug (as the (six) file existed in the file system).
Can you try to reinstall python-setuptools?
I've already done that. No (posive) results.
Did you set any environment variables for python?
No I didn't. It all was after a fresh Arch Linux install where I couldn't have an opportunity to touch anything special.
Are there any problems reported with python packages by pacman?
There doesn't seem to be. Right now I'm away from the computer. I'll reissue the commands provided by you and report the results.
Last edited by Chinggis6 (2017-09-03 22:08:52)
Offline
https://aur.archlinux.org/packages/lostfiles to find files that have been wrongly installed to / when pacman doesn't know about them, `pacman -Qkk "${pkgnames[@]}"` to check whether your python packages have been corrupted.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
pacman -Qkk python-six python-setuptools python-pip buku
python-six: 17 total files, 0 altered files
python-setuptools: 190 total files, 0 altered files
python-pip: 576 total files, 0 altered filesRe-installing these packages does not help.
lostfiles relaxed outputs a long list of file names.
pip itself is broken, so i cannot uninstall those three packages.
Last edited by Chinggis6 (2017-09-05 06:43:07)
Offline
I had the same issue, and I solved it by successively reinstalling python-six, python-appdirs, python-packaging and python-pyparsing.
pacman -S [package]Offline
I read somehwere that this was after the installation of vmware-vcli manually.
The solution, if anyone is still looking for it, is to delete /usr/bin/six.pyc
Offline
I read somehwere that this was after the installation of vmware-vcli manually.
The solution, if anyone is still looking for it, is to delete /usr/bin/six.pyc
How did you end up with six.pyc in /usr/bin?
Folks, please use the package manager and not install stuff to system directories outside of pacman or you're liable to wind up causing conflicts or breakage.
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
Yeah, I have no idea. I've only used the AUR to install python packages.
I installed vmware-vcli manually. Looks like it does something funky. I read another user report of the same issue and they mentioned vmware-vcli so I went looking because I know it changed things in /usr/bin.
I have no idea why this happened.
Last edited by lennonsaves (2017-11-12 01:03:29)
Offline