pysurvival
pysurvival copied to clipboard
Install successful but can not import some modules
I successfully installed pysurvival (after doing brew install gcc and export CC and CXX as per instructions), but when I try to import pysurvival into jupyter notebook I get this error.
And when I try to import some pysurvival modules there is no problem.
Is there maybe some conflict between GCC and clang when compiling C++ code? My OS is Mac OSX Catalina 10.15.1 and I am using Python 3.7.4 but Python 2.7 also exist on my computer.
Based on https://github.com/facebookresearch/fastText/issues/380 I downgraded to Python 3.5 and it started working.
Python 3.5.5 | packaged by conda-forge | (default, Jul 23 2018, 23:45:11) [GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
What I did was run this code in Terminal before running Jupyter Notebook.
I have the latest gcc version from brew, and Python 3.7.
export CC=/usr/local/Cellar/gcc/9.2.0_3/bin/gcc-9 export CXX=/usr/local/Cellar/gcc/9.2.0_3/bin/g++-9 export DYLD_LIBRARY_PATH=/usr/local/Cellar/gcc/9.2.0_3/lib/gcc/9/:$DYLD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/Cellar/gcc/9.2.0_3/lib/gcc/9/:$LD_LIBRARY_PATH
I tried the above command it is not working
What I did was run this code in Terminal before running Jupyter Notebook.
I have the latest gcc version from brew, and Python 3.7.
export CC=/usr/local/Cellar/gcc/9.2.0_3/bin/gcc-9 export CXX=/usr/local/Cellar/gcc/9.2.0_3/bin/g++-9 export DYLD_LIBRARY_PATH=/usr/local/Cellar/gcc/9.2.0_3/lib/gcc/9/:$DYLD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/Cellar/gcc/9.2.0_3/lib/gcc/9/:$LD_LIBRARY_PATH`
This is the way to fix this issue as luisdiegogocm suggested. You just need to make sure you change it to the correct gcc - the latest version is 9.3.0
Hi @TrueKoala and @luisdiegocm. I've updated gcc and ran your code before opening Jupyter notebook. My version of gcc is 9.3.0_1 Then, I ran 'import pysurvival' in the notebook but cannot import some of the psyurvival models such as random survival forest and deep surv
Hello, I'am facing the same issue, and the 2 commands above did not work for me, while changing the gcc version for the on I have installed.
Do we have any update on this? I am also facing the same issue. And the solution mentioned above is not working. Any help will be highly appreciated.