ImportError: No module named six

◇◆丶佛笑我妖孽 提交于 2019-11-26 12:12:29

问题


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\", line 105, in <module>
  File \"modules\\__init__.pyo\", line 23, in <module>
  File \"modules\\gui\\__init__.pyo\", line 22, in <module>
  File \"modules\\gui\\main.pyo\", line 33, in <module>
  File \"rpc.pyo\", line 29, in <module>
  File \"common\\__init__.pyo\", line 22, in <module>
  File \"common\\common.pyo\", line 26, in <module>
  File \"tools\\__init__.pyo\", line 28, in <module>
  File \"dateutil\\relativedelta.pyo\", line 12, in <module>
ImportError: No module named six

Could someone guide what\'s wrong and how it can be fixed???


回答1:


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)




回答2:


If pip "says" six is installed but you're still getting:

ImportError: No module named six.moves

try re-installing six (worked for me):

pip uninstall six
pip install six



回答3:


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".




回答4:


For Mac OS X:

pip install --ignore-installed six



回答5:


pip install --ignore-installed six

Source: 1233 thumbs up on this comment




回答6:


on Ubuntu Bionic (18.04), six is already install for python2 and python3 but I have the error launching Wammu. @3ygun solution worked for me to solve

ImportError: No module named six

when launching Wammu

If it's occurred for python3 program, six come with

pip3 install six

and if you don't have pip3:

apt install python3-pip

with sudo under Ubuntu!



来源:https://stackoverflow.com/questions/13967428/importerror-no-module-named-six

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!