"ImportError: No module named six" ubuntu 20.04 - python

when running "src/bitmessagemain.py" in the terminal it shows
Traceback (most recent call last):
File "src/bitmessagemain.py", line 33, in <module>
import shared
File "/home/otsudo/Desktop/PyBitmessage-0.6/src/shared.py", line 19, in <module>
import highlevelcrypto
File "/home/otsudo/Desktop/PyBitmessage-0.6/src/highlevelcrypto.py", line 16, in <module>
from bmconfigparser import BMConfigParser
File "/home/otsudo/Desktop/PyBitmessage-0.6/src/bmconfigparser.py", line 10, in <module>
from six import string_types
ImportError: No module named six
I am guessing it has to do something with the virtualenv due to bitmessage still running on python 2.7 but I cant figure it out. I've made the environment for bitmessage to run in and I keep getting the error.

You probably don't have the six Python module installed,
try this:
pip install six

Related

Plotly package no module named 'retrying'

I searched for a long time for solution about my problem but I wasn't able to find.
I'm using anaconda with python 3.7.4.
When I try to launch my app.py file, I got this error.
Of course, I downloaded Plotly 4.6 using the tar.bz2 file and using "conda install plotly4.6.0.tar.bz2" (I needed this as i do it offline).
Traceback (most recent call last):
File "app.py", line 9, in <module>
import plotly
File "C:\ProgramData\Anaconda3\lib\site-packages\plotly\__init__.py", line 30,
in <module>
from plotly import (
File "C:\ProgramData\Anaconda3\lib\site-packages\plotly\io\__init__.py", line
1, in <module>
from ._orca import to_image, write_image
File "C:\ProgramData\Anaconda3\lib\site-packages\plotly\io\_orca.py", line 14,
in <module>
import retrying
ModuleNotFoundError: No module named 'retrying'
I have no idea where this problem is coming from.
Thanks.

Error installing Spyder in anaconda

Tried anaconda today , it seems fine but when I tried to launch Spyder each time I get this error: Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\Scripts\spyder-script.py", line 6, in <module>
from spyder.app.start import main
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\app\start.py", line 23, in <module>
from spyder.utils.external import lockfile
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\external\lockfile.py", line 22, in <module>
import psutil
File "C:\Users\Jaker\AppData\Roaming\Python\Python36\site-packages\psutil\__init__.py", line 126, in <module>
from . import _pswindows as _psplatform
File "C:\Users\Jaker\AppData\Roaming\Python\Python36\site-packages\psutil\_pswindows.py", line 16, in <module>
from . import _psutil_windows as cext
ImportError: cannot import name '_psutil_windows'
Any help regarding this ? Also how do I get python 3.6.3 in anaconda..?
The problem is you have two Python versions installed in your system: one in C:\ProgramData\Anaconda3\ and the other in C:\Users\Jaker\AppData\Roaming\Python\Python36.
Please uninstall one of them and the problem will be solved.

pip3 not installing in correct folder

While python3 expects modules to be in /usr/local/lib/python3.4, pip3 installs them in /usr/local/lib/python3.4/dist-packages. This results in python3 not finding packages that pip3 says are installed.
I tried cutting and pasting the stuff in /usr/local/lib/python3.4/dist-packages to /usr/local/lib/python3.4, but I end up with weird errors, like this:
Traceback (most recent call last):
File "setup.py", line 13, in <module>
from Cython.Build import cythonize
File "/usr/local/lib/python3.4/Cython/Build/__init__.py", line 1, in <module>
from .Dependencies import cythonize
File "/usr/local/lib/python3.4/Cython/Build/Dependencies.py", line 51, in <module>
from ..Compiler.Main import Context, CompilationOptions, default_options
File "/usr/local/lib/python3.4/Cython/Compiler/Main.py", line 30, in <module>
from .Symtab import ModuleScope
File "/usr/local/lib/python3.4/Cython/Compiler/Symtab.py", line 18, in <module>
from . import PyrexTypes
File "/usr/local/lib/python3.4/Cython/Compiler/PyrexTypes.py", line 17, in <module>
from .Code import UtilityCode, LazyUtilityCode, TempitaUtilityCode
ImportError: /usr/local/lib/python3.4/Cython/Compiler/Code.cpython-34m.so: undefined symbol: PyFPE_jbuf
What do I do now? I'm on Linux Mint Cinnamon 64-bit.
[EDIT]
This problem was a complete mess and I still have no clue what happened before. I have given up trying to get Python to work, as I have found an application that does the same thing as the Python application I was trying to get working. It's such a pain.

Jupyter install for Python 2.7 failed

I have the Anaconda distribution of Python 2.7 and I needed to install the Jupyter notebook package. During the installation process my computer turned off and after that I couldn't continue with the process. I tried to uninstall Jupyter and try installing it again, but I keep getting the same error:
Traceback (most recent call last):
File "C:\Users\Acer\Anaconda\Scripts\ipython-script.py", line 3, in <module>
from IPython import start_ipython
File "C:\Users\Acer\Anaconda\lib\site-packages\IPython\__init__.py", line 49, in <module>
from .terminal.embed import embed
File "C:\Users\Acer\Anaconda\lib\site-packages\IPython\terminal\embed.py", line 19, in <module>
from IPython.terminal.ipapp import load_default_config
File "C:\Users\Acer\Anaconda\lib\site-packages\IPython\terminal\ipapp.py", line 22, in <module>
from IPython.core.completer import IPCompleter
File "C:\Users\Acer\Anaconda\lib\site-packages\IPython\core\completer.py", line 71, in <module>
from IPython.utils import generics
File "C:\Users\Acer\Anaconda\lib\site-packages\IPython\utils\generics.py", line 8, in <module>
from simplegeneric import generic
ImportError: No module named simplegeneric
What should I remove/add in order to make it work?
You need to install the python package simplegeneric. After you install it, you need to install the next package that you fail to import. Continue this process until you dont get any import errors.

Getting error when importing some package on python scripts

Here is my error:
Traceback (most recent call last):
File "./convert.py", line 6, in <module>
import openpyxl # from https://pythonhosted.org/openpyxl/ or PyPI (e.g. via pip)
ImportError: No module named openpyxl
i have installed the python package openpyxl but this error still appear
Im using linux python version 2.6.6
any help please
i got this new error when i ran the python2.7 script.py:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 7, in <module>
from pip import main
File "/usr/local/lib/python2.7/site-packages/pip/__init__.py", line 13, in <module>
from pip.utils import get_installed_distributions, get_prog
File "/usr/local/lib/python2.7/site-packages/pip/utils/__init__.py", line 15, in <module>
import zipfile
File "/usr/local/lib/python2.7/zipfile.py", line 6, in <module>
import io
File "/usr/local/lib/python2.7/io.py", line 51, in <module>
import _io
ImportError: /usr/local/lib/python2.7/lib-dynload/_io.so: undefined symbol: _PyErr_ReplaceException
openpyxl module has 2 dependent modules : 1. jdcal 2. et_xmlfile
I was able to install openpyxl module and this is what I did :
1.Downloaded the openpyxl,jdcal and et_xmlfile from https://pypi.python.org/pypi and saved jdcal-1.0.tar.gz, et_xmlfile-1.0.0.tar.gz,openpyxl-2.3.0-b2.tar.gz in a local folder in my system.
2.Then I ran the commands in the following order :
pip install jdcal-1.0.tar.gz
pip install et_xmlfile-1.0.0.tar.gz
pip install openpyxl-2.3.0-b2.tar.gz
openpyxl got successfully after this. Please check whether this helps.

Categories