I installed the 32 bit version of Python 3.2.2 and want to get the pySerial package to work. I most definitely have the pyWin32 package install but still when I try to import serial it gives me this error
>>> import serial
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Python32\lib\site-packages\serial\__init__.py", line 19, in <module>
from serialwin32 import *
ImportError: No module named serialwin32
>>>
Any help?
Search around in your C:/Python32/Lib/site-packages/serial/. See if you can find a file named serialwin32. If not, you should try uninstalling pywin32 and reinstalling it.
Related
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
I installed PyTouchBar using pip3
When I tried to import it, however, it gives me this error.
$ python3
>>> import PyTouchBar
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/PyTouchBar/__init__.py", line 5, in <module>
from .TouchBar import *
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/PyTouchBar/TouchBar.py", line 13, in <module>
from Foundation import *
ModuleNotFoundError: No module named 'Foundation'
On Python 2, Foundation works perfectly, by the way.
Could someone tell me how to fix this? Thanks in advance!
I think your problem could be one of these:
You installed PyTouchBar on python2 instead of python3, in which case you have to use:
pip3 install PyTouchBar
You are using a venv and installed from the terminal/command line instead of the venv's terminal
PyTouchBar uses foundation that you have to install separately
I got Pyusb with pip install pyusb but when I try to import usb.core I get:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import usb.core
File "C:\Users\Owner\Desktop\usb.py", line 1, in <module>
import pyusb
ImportError: No module named 'pyusb'
I also tried installing pyusb-1.0.2.tar.gz manuall with pip, but that didn't fix the issue.
I think you want import usb instead of import pyusb.
I'm running Ubuntu 12.10
Enthought Canopy Python 2.7.6 64 bit
I have succesfully installed healpy using the direct Healpix configuration as well as using sud pip install healpy, and have made sure PYTHONPATH was set accordingly in the bashrc.
When I try to import healpy I get this unicode incomparability related error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/healpy/__init__.py", line 47, in <module>
from sphtfunc import (anafast, map2alm,
File "/usr/local/lib/python2.7/dist-packages/healpy/sphtfunc.py", line 26, in <module>
import _sphtools as _sphtools
ImportError: /usr/local/lib/python2.7/dist-packages/healpy/_sphtools.so: undefined symbol: PyUnicodeUCS4_DecodeUTF8
Related issues have solutions that require rebuilding. I'm not sure how to go about doing this, and was wondering if there is an easier solution. Thank you in advance for any assistance.
I use ropevim perfectly in Ubuntu system,
but i got lots of lots error.
i use homebrew to install macvim and python
and follow the tutorial.
http://wizardmode.com/2012/07/mountain-lion-and-homebrew-vim-importerror-no-module-named-site/
I wander know is the ropevim are very buggy or not practical in mac os system.
because the discussion is not popular?
or is there any better solution in vim for Python on mac os?
Thanks very much...it's annoying me lots of time
>>> import rope
>>> import ropevim
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ropevim-0.3_rc-py2.7.egg/ropevim.py", line 10, in <module>
import vim
ImportError: No module named vim
and when I put the ropevim.vim in .vim/plugin
I will got the error when using vim
/install/ropehg/ropemode:vim la
Error detected while processing function LoadRope:
line 3:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/pyt
hon2.7/site-packages/ropevim-0.3_rc-py2.7.egg/ropevim.py", line 3, in <module>
import tempfile
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/pyt
hon2.7/tempfile.py", line 32, in <module>
import io as _io
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/pyt
hon2.7/io.py", line 51, in <module>
import _io
ImportError: dlopen(/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions
/2.7/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyInt_AsInt
Referenced from: /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/
2.7/lib/python2.7/lib-dynload/_io.so
Expected in: flat namespace
in /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2
.7/lib-dynload/_io.so
I encountered a very similar stack trace when setting up some vim extensions from this page http://sontek.net/blog/detail/turning-vim-into-a-modern-python-ide
I believe the problem comes from incompatibilities between 'macport' and native python libraries, and that the native version of vim tries to pull from both.
I ultimately resolved my problem by using macport to install vim with python27 variant.
sudo port install vim +python27
The default configuration of macport's vim is without 'python' enabled.