1

I'm on Linux Mint and have at least 3 versions of python (2, 3.4, 3.5).

Trying to use pip3.5, I get:

Import Error: No module named six 

But, trying to install six via any of the following give the same error:

sudo easy_install-3.5 six
sudo python3.5 -m easy_install six
sudo pip3.5 install six

It feels like this is circular reasoning since I can't use pip or easy_install since I don't have six, but I can't install six since pip or easy_install won't work without it.

James T.
  • 910
  • 1
  • 11
  • 24
  • 1
    If no answer will help, try this as the absolute last resort: [download `six` source tar from PyPI](https://pypi.python.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz#md5=d12789f9baf7e9fb2524c0c64f1773f8), unpack it with `tar`, go in the unpacked directory and run `sudo python3.5 setup.py install`. I should warn you, though - you will not be able to uninstall it afterwards and this installation method is highly discouraged, especially combined with `sudo`. Use only if nothing else helps. – hoefling Dec 20 '17 at 21:19
  • In OEL, a RHEL derivative, a `python-six` rpm package is available for the reason you already mentioned. After installation of this package, `pip` and `easy_install` can then be used to install other modules. What python distribution are you running? – alvits Dec 20 '17 at 21:21
  • @alvits I think I already had the package `python-six` installed through `apt` if that's what you're talking about, and that didn't help. Solution found now anyways. – James T. Dec 20 '17 at 21:28

2 Answers2

0

Can you try to run first:

[sudo] pip3.5 install --upgrade setuptools

before

sudo pip3.5 install six
baybatu
  • 81
  • 8
0

answer borrowed from https://stackoverflow.com/a/32385896/3854436

$ cd /usr/local/lib/python3.4/dist-packages    
$ sudo cp six.py six-1.11.0.dist-info/ ../../python3.5/dist-packages/ -r
James T.
  • 910
  • 1
  • 11
  • 24
  • Manually downloading and unpacking `six` as @hoefling mentioned is probably better in-case there's changes from py3.4 to py3.5 of the module, and it should be installed in the correct location(s) since it's installed through the setup.py. – James T. Dec 20 '17 at 21:27