ImportError: No module named six

后端 未结 8 589
无人共我
无人共我 2020-11-28 06:52

I\'m trying to build OpenERP project, done with dependencies. It\'s giving this error now

Traceback (most recent call last):
  File \"openerp-client.py\", li         


        
相关标签:
8条回答
  • 2020-11-28 07:16
    pip install --ignore-installed six
    

    Source: 1233 thumbs up on this comment

    0 讨论(0)
  • 2020-11-28 07:16

    I did the following to solve the mentioned problem. I got the mentioned problem when I was trying to run the built exe, even I successfully built the exe using pyinstaller. I did this on Windows 10.

    1. go to https://pypi.org/project/six/#files
    2. download "six-1.14.0.tar.gz (33.9 kB)"
    3. unzip it, copy and paste "six.py" into your source directory.
    4. import "six" module into your source code (import six)
    5. run source script.
    0 讨论(0)
  • 2020-11-28 07:19

    On Ubuntu and Debian

    apt-get install python-six
    

    does the trick.

    Use sudo apt-get install python-six if you get an error saying "permission denied".

    0 讨论(0)
  • 2020-11-28 07:21

    You probably don't have the six Python module installed. You can find it on pypi.

    To install it:

    $ easy_install six
    

    (if you have pip installed, use pip install six instead)

    0 讨论(0)
  • 2020-11-28 07:24

    For Mac OS X:

    pip install --ignore-installed six
    
    0 讨论(0)
  • 2020-11-28 07:25

    In my case, six was installed for python 2.7 and for 3.7 too, and both pip install six and pip3 install six reported it as already installed, while I still had apps (particularly, the apt program itself) complaining about missing six.

    The solution was to install it for python3.6 specifically:

    /usr/bin/python3.6 -m pip install six
    
    0 讨论(0)
提交回复
热议问题