ImportError: No module named six
Question:
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 "modulesgui__init__.pyo", line 22, in <module>
File "modulesguimain.pyo", line 33, in <module>
File "rpc.pyo", line 29, in <module>
File "common__init__.pyo", line 22, in <module>
File "commoncommon.pyo", line 26, in <module>
File "tools__init__.pyo", line 28, in <module>
File "dateutilrelativedelta.pyo", line 12, in <module>
ImportError: No module named six
Could someone guide what’s wrong and how it can be fixed???
Answers:
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”.
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
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!
For Mac OS X:
pip install --ignore-installed six
pip install --ignore-installed six
Source: 1233 thumbs up on this comment
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.
- go to https://pypi.org/project/six/#files
- download “six-1.14.0.tar.gz (33.9 kB)”
- unzip it, copy and paste “six.py” into your source directory.
- import “six” module into your source code (import six)
- run source script.
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
For me the issue wasn’t six
but rst2pdf
itself. head -1 $(which rst2pdf)
(3.8) didn’t match python3 --version
(3.9). My solution:
pip3 install rst2pdf
Ubuntu 18.04.5 LTS (Bionic Beaver):
apt --reinstall install python3-debian
apt --reinstall install python3-six
If /usr/bin/chardet3 fails with error "ModuleNotFoundError: No module named ‘pkg_resources’":
apt --reinstall install python3-pkg-resources
six
is a Python module. The python
command may refer to Python2.
It is possible that you are confusing Python2 and Python3, or that you confused the Python version number this module applies to. six
for Python2 is distinct from six
for Python3.
If installing six
still does not work via pip, consider running Python3 instead.
For Ubuntu and Debian
Try to execute the following command-
sudo apt install python-six
If it’s not working perfectly then try to force it by using the following command-
/usr/local/bin/pip3 install six
I hope it works!
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 "modulesgui__init__.pyo", line 22, in <module>
File "modulesguimain.pyo", line 33, in <module>
File "rpc.pyo", line 29, in <module>
File "common__init__.pyo", line 22, in <module>
File "commoncommon.pyo", line 26, in <module>
File "tools__init__.pyo", line 28, in <module>
File "dateutilrelativedelta.pyo", line 12, in <module>
ImportError: No module named six
Could someone guide what’s wrong and how it can be fixed???
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”.
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
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!
For Mac OS X:
pip install --ignore-installed six
pip install --ignore-installed six
Source: 1233 thumbs up on this comment
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.
- go to https://pypi.org/project/six/#files
- download “six-1.14.0.tar.gz (33.9 kB)”
- unzip it, copy and paste “six.py” into your source directory.
- import “six” module into your source code (import six)
- run source script.
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
For me the issue wasn’t six
but rst2pdf
itself. head -1 $(which rst2pdf)
(3.8) didn’t match python3 --version
(3.9). My solution:
pip3 install rst2pdf
Ubuntu 18.04.5 LTS (Bionic Beaver):
apt --reinstall install python3-debian
apt --reinstall install python3-six
If /usr/bin/chardet3 fails with error "ModuleNotFoundError: No module named ‘pkg_resources’":
apt --reinstall install python3-pkg-resources
six
is a Python module. The python
command may refer to Python2.
It is possible that you are confusing Python2 and Python3, or that you confused the Python version number this module applies to. six
for Python2 is distinct from six
for Python3.
If installing six
still does not work via pip, consider running Python3 instead.
For Ubuntu and Debian
Try to execute the following command-
sudo apt install python-six
If it’s not working perfectly then try to force it by using the following command-
/usr/local/bin/pip3 install six
I hope it works!