ImportError: No module named data_io - python-2.7

l'm under python2.7 l can't import data_io l got this error :
ImportError: No module named data_io
Here is my code
import data_io
reload(data_io)
data = data_io.read_as_df(basename)

Have you run the command?
pip install dataIO
If so are you sure it is install in the right directory? Please provide more details on your pathenv.

Related

Anaconda - Spyder 3.3.6 - Python 2.7 - no module named matplotlib

I'm trying to use matplotlib on spyder 3.3.6 but I'm having trouble importing it in the first place, is there some way to install matplotlib beforehand? I don't have a very specific question, I guess I'm just requesting someone to help me with this. I'm pretty new to using python
import matplotlib.pyplot as plt
and it returns " ImportError: No module named matplotlib.pyplot "
when I run
pip install matplotlib
I get
pip install matplotlib
^
SyntaxError: invalid syntax

ModuleNotFoundError: No module named 'textencoder' error when upgraded to python 3

Currently I have migrated my python2 django project to python 3 & after conversion to py3 I am getting below kind of error for below code.
from hubarcode.code128 import Code128Encoder
encoder = Code128Encoder(pur_num, {'is_reliable': False})
Trackeback is as below.
from hubarcode.code128 import Code128Encoder
File "D:\my_project\venv\lib\site-packages\hubarcode\code128__init__.py", line 16, in
from textencoder import TextEncoder
ModuleNotFoundError: No module named 'textencoder'
I have tried to search for solution online on google but not able to solve it.
Any suggestions ?
Thanks.
I am able to solve issue by using pyStrich.
First you need to install pyStrich using pip3 install pyStrich and after thatn
What you need to do is just replace from hubarcode.code128 import Code128Encoder with
from pystrich.code128 import Code128Encoder.
I hope it may help others who have been facing same kind of problem.
pip freeze will show it if you have this module installed in your venv
pip install textencoder to resolve problem

Caffe Framework :Importing Error

I followed the instructions from "https://gist.github.com/nikitametha/c54e1abecff7ab53896270509da80215" and installed caffe framework.
But ,when I import caffe from some other directory ,it is showing this error
caffe framework was installed but, it still shows the import error -
No module named caffe
How to solve this issue?
Thank you...
You need to add ~/caffe/python to your $PYTHONPATH. either
~$ PYTHONPATH=$PYTHONPATH:~/caffe/python python
>>> import caffe
Or you can do it inside python
>>> import sys
>>> sys.path.insert(0, '~/caffe/python')
>>> import caffe
Alternatively, you can modify your ~/.bashrc file and fix PYTHONPATH environmet variable there

(Scikit - Python) ImportError: No module named scipy

I'm trying to install Scikit and run a python file that only has:
import sklearn
To check if Scikit works. This is the error I get:
Traceback (most recent call last):
File "hello-world.py", line 1, in
import sklearn
File "/Library/Python/2.7/site-packages/sklearn/init.py", line 57, in
from .base import clone
File "/Library/Python/2.7/site-packages/sklearn/base.py", line 9, in
from scipy import sparse
ImportError: No module named scipy
I have been at this for hours now. My python version is Python 2.7.11
which -a python
gives me this:
/usr/local/bin/python
/usr/bin/python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
/Users/Iliad/anaconda/bin/python
I had had Python 3.5 Installed before, but downloaded Anaconda for 2.7, but can't make sure it is set to work with that version.
Thanks!
I will start with
python --version
Just to be sure
and then in python repl. Use this
import site
site.getsitepackages()
This would give you something like :
['/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']
Check in all the dist-packages for scipy. My guess is that it is not there.
If you have any other "dist-packages" type of folder then you should add that to your PYTHONPATH.

import error in django-sendsms

I'm trying to use django-sendsms based on this documentation
I downloaded the package,copied it's folder in c: and ran this command in shell
c:
cd django-sendsms
python setup.py install
these commands installed django-sms in sitepackages folder.then based on the documentation I added this backend to settings.py:
SENDSMS_BACKEND = 'sendsms.backends.console.SmsBackend'
and in views.py :
from sendsms import api
api.send_sms(body='I can haz txt', from_phone='+41791111111', to=['+41791234567'])
but I get this error:
No module named importlib
every thing is based on the documentation,I don't know what's wrong with it!
Which version of Python are you using? It seems that module (in sendsms/util.py) will import the library called importlib which only exists in Python 2.7. If you are using Python 2.6 or lower, that library do not exist.