[ITK] [ITK-users] 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/community/attachments/20150715/224c4d2e/attachment.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users
More information about the Community
mailing list