ImportError: No module named traits.api - python-2.7

I have installed mayavi to spyder in windows 7 and when I am trying to import mlab I get a strange warning:
ImportError: No module named traits.api
Does anybody have experienced the same problem? Any suggestions? Thanks a lot in advance.

You need to install the mayavi dependencies VTK, appinst, apptools, envisage, traitsui, traits, pyface, configobj

Ok, I found a very useful post which solved the issue. The problem was that I had set PATH variable for searching for the basetsd.h instead of INCLUDE (C:\Program Files\Microsoft SDKs\Windows\v7.0\Include). Moreover, I set LIB for C:\Program Files\Microsoft SDKs\Windows\v7.0\Lib.
Now I can successfully run mayavi on windows 7 and Spyder. However, I cannot run it from IPython :(

Related

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

how do i fix "No module named 'win32api'" on python2.7

I am trying to import win32api in python 2.7.9. i did the "pip install pypiwin32" and made sure all the files were intalled correctly (i have the win32api.pyd under ${PYTHON_HOME}\Lib\site-packages\win32). i also tried coping the files from C:\Python27\Lib\site-packages\pywin32_system32 to C:\Python27\Lib\site-packages\win32. I also tried restarting my pc after each of these steps but nothing seems to work! i still get the error 'No module named 'win32api''
Well, turns out the answer is upgrading my python to 3.6.
python 2.7 seems to old to work with outside imports (I'm just guessing here, because its not the first time I'm having an import problem)
hope it helps :)

ImportError: No module named vaderSentiment

I'm trying to run a code in python2.7 on windows os that uses sentiment analysis
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
analyzer = SentimentIntensityAnalyzer()
and I'm getting this error
ImportError: No module named vaderSentiment
Can anyone help me with this?
Assuming you solved this one as it's from 7 months ago, but for anyone else searching for it:
Go into terminal/cmd and paste the following:
pip install vaderSentiment
More info on VADER: https://github.com/cjhutto/vaderSentiment
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
#note: depending on how you installed (e.g., using source code download versus pip install), you may need to import like this:
#from vaderSentiment import SentimentIntensityAnalyzer
read the comment in a code
Try running your file with Python3 instead of just python. Sometimes when you have different pips/pythons installed on your computer you might have vaderSentiment installed in python2 when you need to run it in python3.

Orange 3 - openSUSE 13.1 installation - No widgets

I am having trouble installing Orange3 from github on openSUSE 13.1.
I have all requirements installed: gcc, g++, python 3-devel, pysci, pyqt4devel etc.
I followed these instructions, everything seems to work (with many warnings when compiling), however when entering in Orange.canvas, there are no widgets at all. It seems they have been missing on installation/compilation.
Any idea about what I did miss in the install or requirements?
Thanks for the -l3 options.
All the widgets get the same error on import
File "./Orange/widgets/utils/overlay.py", line 10, in <module>
import enum
ImportError: No module named 'enum'
Could not import 'orangecontrib.datafusion.widgets.owsamplematrix'``
I am not Python specialist, I will check for this module ..

Error on Pycharm: ImportError

I'm, working on Windows 8 and I receive this error when launching my python program on pycharm:
ImportError: No module named Qwt5
refered to the line: "import PyQt4.Qwt5 as Qwt"
the program always worked till today, and the IDE still suggests me Qwt5 as a module to import when pressing CTRL+SPACE, so it seems is still recognized.
I checked the Qwt5 folder and there is the __init__.py file
I use Python 2.7.9 an is correctly selected as Python Interpreter
I've already tried to remove the packages and reinstall them.
Someone can help me?
i tried this and working.sudo apt-get install python-qwt5-qt4