Open WillemMarais opened 9 years ago
When I follow the install documentation under Python 3.4 on OSX, my install fails, even when I add an additional command make
. Could the documentation be clarified for the Python installation like @WillemMarais requested?
I get output from cmake .
that indicates that it found my system PythonLibs and SWIG while relying on Anaconda python/numpy. However, I cannot parse the above comment and don't know what each step does. @WillemMarais could you please clean up your comment and format it nicely?
> cd rwt/python
> cmake .
...
-- Found SWIG: /usr/local/bin/swig (found version "3.0.2")
-- Found PythonLibs: /usr/lib/libpython2.7.dylib (found version "2.7.3")
python: /Users/scott/anaconda/bin/python
numpy : /Users/scott/anaconda/lib/python3.4/site-packages/numpy/core/include
...
> make
...
Linking CXX shared module _rwt.so
[100%] Built target _rwt
> sudo make install
> python
>>> import rwt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/scott/Downloads/rwt-master/python/rwt.py", line 35, in <module>
_rwt = swig_import_helper()
File "/Users/scott/Downloads/rwt-master/python/rwt.py", line 31, in swig_import_helper
_mod = imp.load_module('_rwt', fp, pathname, description)
File "/Users/scott/anaconda/lib/python3.4/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
ImportError: dynamic module does not define init function (PyInit__rwt)
When I run this under Python 2.7 using a conda virtualenv, I get the same error as above PyThreadState_Get: no current thread
@stsievert were you able to fix the ImportError ?
I am using a similar setup: Anaconda with Python 3.5 and I get the Import Error dynamic module does not define init function (PyInit__rwt)
No, I have moved to PyWavelets. My biggest barrier in using this was that PyWavelets doesn't return a ndarray of the entire wavelet transform but instead returns a tuple of tuples of lists. PyWavelets PR #168 rectifies this.
I'm using Anaconda as my python distribution (on a Mac). When I try to compile rwt on my system against Anaconda, I get an error as shown in the title of this issue. There are possibly three reasons for this:
Below are information that shows the problem and the fix. If a user, like me, wants to install rwt alongside Anaconda, could you add instructions in the documentation to show how it can be done?
SHOWING SYSTEM INFORMATION
Darwin hostname 14.4.0 Darwin Kernel Version 14.4.0: Datetime 2015; root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64
TERM_PROGRAM=Apple_Terminal TERM=xterm-256color SHELL=/bin/bash TMPDIR=/var/folders/jp/bbbjnpys6n1dsbpw8wtm9bxh0000gp/T/ Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.b0806cvhV9/Render TERM_PROGRAM_VERSION=343.7 OLDPWD=$HOME/Temp TERM_SESSION_ID=BC756C22-A12E-4817-847B-913DFB4F5FAE SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.3QWtJEqlQO/Listeners __CF_USER_TEXT_ENCODING=0x1F6:0x0:0x0 PATH=$HOME/Apps/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin PWD=$HOME/Temp/rwt/python EDITOR=mate LANG=en_US.UTF-8 XPC_FLAGS=0x0 XPC_SERVICENAME=0 SHLVL=1 DISPLAY=/private/tmp/com.apple.launchd.G3vnOgR0aM/org.macosforge.xquartz:0 =/usr/bin/printenv
conda 3.15.1
1.9.2
$HOME/Apps/anaconda/bin/python
SHOWING THE COMPILER WARNING AND ERROR
$HOME/Apps/anaconda/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
warning "Using deprecated NumPy API, disable it by " \
^ 1 warning generated. [ 37%] Building C object CMakeFiles/_rwt.dir/Users/willemm/Temp/rwt/lib/src/dwt.c.o [ 50%] Building C object CMakeFiles/_rwt.dir/Users/willemm/Temp/rwt/lib/src/idwt.c.o [ 62%] Building C object CMakeFiles/_rwt.dir/Users/willemm/Temp/rwt/lib/src/rdwt.c.o [ 75%] Building C object CMakeFiles/_rwt.dir/Users/willemm/Temp/rwt/lib/src/irdwt.c.o [ 87%] Building C object CMakeFiles/_rwt.dir/Users/willemm/Temp/rwt/lib/src/platform.c.o [100%] Building C object CMakeFiles/_rwt.dir/Users/willemm/Temp/rwt/lib/src/init.c.o Linking CXX shared module _rwt.so
Fatal Python error: PyThreadState_Get: no current thread Abort trap: 6
SHOWING THE FIX TO BOTH THE COMPILER WARNING AND ERROR
make clean
_rwt.so: libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0) /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
_rwt.so: $HOME/Apps/anaconda/lib/libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0) /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
Success