Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can't install wxPython on Anaconda Python

I installed Anaconda Python on my RHEL6 system. In order to run gnuradio I need wxPython. For that reason I did

conda install wxpython

The problem is when I try to import Wx module in python. Then the following error arises:

>>> import wx
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/scr1/nemanja/install/anaconda/lib/python2.7/site-packages/wx-3.0-gtk2/wx/__init__.py", line 45, in <module>
from wx._core import *
File "/scr1/nemanja/install/anaconda/lib/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py", line 4, in <module>
import _core_
ImportError: /scr1/nemanja/install/anaconda/lib/python2.7/site-packages/wx-3.0-gtk2/wx/../../../../libwx_gtk2u-3.0.so.0: undefined symbol: g_malloc_n

What is missing here?

like image 334
Nexy_sm Avatar asked Oct 02 '15 08:10

Nexy_sm


1 Answers

I had a small python script that used wx many years ago, and recently started using anaconda. Then, I faced the same issue when I tried to run the script with the anaconda python as it didn't include the wx package. To try sorting out the issue, what I did is:

binstar search -t conda wxpython

Which will list up the name (i.e., wxpython), version, type and platform. Select the right version for you when using the command:

conda install -c anaconda wxpython=(version)

In which 3.0 for (version) works for me on Windows 7.

like image 63
user6497058 Avatar answered Sep 22 '22 02:09

user6497058