import healpy unicode error with enthought canopy python - python

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.

Related

ImportError: Undefined Symbol when importing python module 'pyfftw'

I want to use pyfftw module and I install it using sudo apt-get install python-fftw. The FFTW module is already installed. However, when I try to import pyfftw this error happens:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/pyfftw/__init__.py", line 16, in <module>
from .pyfftw import (
ImportError: /usr/lib/python2.7/dist-packages/pyfftw/pyfftw.arm-linux-gnueabihf.so: undefined symbol: fftwl_plan_with_nthreads
Anyone knows how to troubleshoot this? For additional information, my system architecture is armv7l (I am running the program in odroid), my OS is Ubuntu and I use python 2.7.12.
Thank you.

Trouble installing Pygame on a Mac

I've installed Python 2.7 and Pygame on my Mac, but every time I try to 'import pygame', I get this error message:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import pygame
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/__init__.py", line 95, in <module>
from pygame.base import *
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so, 2): no suitable image found. Did find:
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so: no matching architecture in universal wrapper
What am I doing wrong?
This is a typical architecture issue. Try a
file /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so
If one of the result lines includes your architecture (e.g. i386), then the problem is not from the package itself, but from the way you launched it. Try then to launch it from a 32 bits instance of Python:
python2.7-32
>>>import pygame
NB: you can guess your architecture with
uname -m

Ropevim error in mac os 10.8.4

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.

Problems installing gnuplot on mac os x

I'm getting this error after downloading the .zip file:
Traceback (most recent call last):
File "setup.py", line 15, in <module>
from __init__ import __version__
File "/Users/me/Downloads/gnuplot-py-1.8/__init__.py", line 164, in <module>
from gp import GnuplotOpts, GnuplotProcess, test_persist
ImportError: cannot import name GnuplotOpts
I have gnuplot installed on my machine, if I type gnuplot on the terminal the gnuplot terminal pops up. I'm trying to call it with python and it's saying it's not installed. This may be a path issue, but I'm just trying to make sure EVERYTHING needed is installed. (Path recommendations would be appreciated too)
Mac 10.7 Lion
So guys, the issue was solved by doing :
pip install http://prdownloads.sourceforge.net/gnuplot-py/gnuplot-py-1.8.tar.gz?download
and importing Gnuplot.

pySerial not working on Python3.2.2

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.

Categories