[ITK-users] [ITK] ImportError: No module named _SimpleITK
David Welch
david.m.welch at gmail.com
Wed Jul 15 15:03:47 EDT 2015
Thanks, Brad! I ended up copying the CMakeCache.txt, modifying it to
remove all the Anaconda dependencies, and building it against the source
inside my virtualenv. Here's how I did it:
$ workon <my_env>
$ mkdir -p $VIRTUAL_ENV/build/SimpleITK-build
$ cd $VIRTUAL_ENV/build/SimpleITK-build
$ cp /path/to/past/SimpleITK-build/CMakeCache.txt .
$ ccmake . \
-DCMAKE_C_COMPILER:STRING=/usr/bin/clang \
-DCMAKE_CXX_COMPILER:STRING=/usr/bin/clang++ \
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${VIRTUAL_ENV} \
-DCMAKE_BUNDLE_OUTPUT_DIRECTORY:PATH=${VIRTUAL_ENV} \
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${VIRTUAL_ENV}/lib \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${VIRTUAL_ENV}/bin \
-DCMAKE_INSTALL_PREFIX:PATH=${VIRTUAL_ENV} \
-DPYTHON_EXECUTABLE:PATH=$(which python) \
-DPYTHON_LIBRARY:PATH=/System/Library/Frameworks/Python.framework/Versions/2.7/Python
\
-DPYTHON_INCLUDE_DIR:PATH=/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
\
-DPYTHON_INCLUDE_DIRS:PATH=/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
$ make
$ make install/local
I found that I had to set both the PYTHON_INCLUDE_DIR(S) variables, but
other than that there weren't any hiccups.
Cheers,
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20150715/224c4d2e/attachment.html>
More information about the Insight-users
mailing list