ImportError: No module named 'version' during installation - python

I'm trying to install SMOP on Anaconda3 (Python 3.5.1), but it fails due to the following error:
[Anaconda3] C:\Users\IanHacker\Downloads\smop-0.29>python setup.py install
Traceback (most recent call last):
File "setup.py", line 4, in <module>
from smop.version import __version__
File "C:\Users\IanHacker\Downloads\smop-0.29\smop\__init__.py", line 4, in <module>
import version
ImportError: No module named 'version'
"pip install smop" and "easy_install smop" return the same error.
I referred to ImportError: No module named 'version', so I changed the content of __init__.py:
import version
import parse,resolve,backend,main
from version import __version__
to:
__version__ = '0.29'
import parse,resolve,backend,main
... then, I got:
[Anaconda3] C:\Users\IanHacker\Downloads\smop-0.29>python setup.py install
Traceback (most recent call last):
File "setup.py", line 4, in <module>
from smop.version import __version__
File "C:\Users\IanHacker\Downloads\smop-0.29\smop\__init__.py", line 6, in <module>
import parse,resolve,backend,main
ImportError: No module named 'parse'
I don't even know if the __version__ issue has been solved.
Even if it has been solved, I don't know what to replace "parse" with.
And ... do I have to keep replacing until this works? Is there any better way to solve this?
*For those who installed Anaconda, could you try to run the command and check if the same error happens? Am I the only one who gets this error?

Related

ModuleNotFoundError: No module named '_curses'

I am using windows and would like to use the curses package,I installed it with the command:
pip install windows-curses
but when I try to import curses
it gives an eror from the python source file
__init__.py
here's the eror:
C:\Users\user\PycharmProjects\snake\venv\Scripts\python.exe C:/Users/user/AppData/Local/Programs/Python/Python39/Lib/curses/__init__.py
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python39\Lib\curses\__init__.py", line 12, in <module>
from _curses import *
ModuleNotFoundError: No module named '_curses'
Can someone please help me fix it?

Distributed package cannot find import

I'm trying to distribute this code through git+pip . I was able to properly create the setup.py file for deployment but after installing the package with:
https://github.com/EKami/kaggle-data-downloader
Running this import gives me an error:
>>> from kaggle_data_downloader import KaggleDataDownloader
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/Ekami/Programs/anaconda/envs/tensorflow/lib/python3.6/site-packages/kaggle_data_downloader/KaggleDataDownloader.py", line 3, in <module>
import utils
ModuleNotFoundError: No module named 'utils'
But with:
>>> import kaggle_data_downloader.utils
It works. It seems KaggleDataDownloader cannot find kaggle_data_downloader.utils. I think I missed something in the setup.py file. Any idea?
Thanks.

ImportError: No module named 'baseapi'

I can`t use the pyfcm module because of bellow error message.
How do I fix this error??
>>> from pyfcm import FCMNotification
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from pyfcm import FCMNotification
File "C:\Anaconda3\lib\site-packages\pyfcm\__init__.py", line 6, in <module>
from .fcm import FCMNotification
File "C:\Anaconda3\lib\site-packages\pyfcm\fcm.py", line 1, in <module>
from baseapi import BaseAPI
ImportError: No module named 'baseapi'
If you are running Linux, try running this command in the shell: pip install baseapi.
If you are using an IDE, look for a prompt asking if you want to install this package.

ImportError: No module named 'jsonconv'

I am running Python 3.4
Did pip install json2html with no errors.
However, when I execute "import json2html" I got:
>>> import json2html
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python34\lib\site-packages\json2html-0.3-py3.4.egg\json2html\__init__.py", line 6, in <module>
ImportError: No module named 'jsonconv'
>>>
please help suggest..
It seems this library is not python3-compatible.
Error was caused by this line in the __init__.py file:
from jsonconv import *
While, instead, it should be:
from .jsonconv import *
Try this fork instead: https://github.com/YAmikep/json2html

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