DigitalSlideArchive / HistomicsTK

A Python toolkit for pathology image analysis algorithms.
https://digitalslidearchive.github.io/HistomicsTK/
Apache License 2.0
380 stars 113 forks source link

Error when install HTK #367

Closed jay960702 closed 6 years ago

jay960702 commented 7 years ago

When I tried to install HTK from the source with $ pip install ., I get the following error:

-- Trying "Unix Makefiles" generator - success

-- The C compiler identification is GNU 4.9.4
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /home/wzc960702/anaconda2/bin/python (found version)
-- Found PythonLibs: /home/wzc960702/anaconda2/lib/libpython2.7.so (found )
-- Found Cython: /home/wzc960702/anaconda2/bin/cython
-- Found NumPy: /usr/include (found version "1.13.1")
-- Performing Test Weak Link MODULE -> SHARED (gnu_ld_ignore) - Success
NUMPY_INCLUDE_DIRS:/usr/include
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    SKBUILD

-- Build files have been written to: /tmp/pip-c1N0Ws-build/_skbuild/cmake-d
[ 16%] Generating CXX source histomicstk/segmentation/label/_trace_object_x

Error compiling Cython file:
------------------------------------------------------------
...
import numpy as np
^
------------------------------------------------------------

/tmp/pip-c1N0Ws-build/histomicstk/segmentation/label/_trace_object_boundare
make[2]: *** [histomicstk/segmentation/label/_trace_object_boundaries_cyth1
make[2]: *** Deleting file `histomicstk/segmentation/label/_trace_object_b'
make[1]: *** [histomicstk/segmentation/label/CMakeFiles/_trace_object_boun2
make: *** [all] Error 2
Traceback (most recent call last):
  File "/home/wzc960702/anaconda2/lib/python2.7/site-packages/skbuild/setup
    cmkr.make(make_args, env=env)
  File "/home/wzc960702/anaconda2/lib/python2.7/site-packages/skbuild/cmake
    os.path.abspath(CMAKE_BUILD_DIR)))

An error occurred while building with CMake.
  Command:
    "cmake" "--build" "." "--target" "install" "--config" "Release" "--"
  Source directory:
    /tmp/pip-c1N0Ws-build
  Working directory:
    /tmp/pip-c1N0Ws-build/_skbuild/cmake-build
Please see CMake's output for more information.

----------------------------------------

Command "/home/wzc960702/anaconda2/bin/python -u -c "import setuptools, tokeni/

cdeepakroy commented 7 years ago

@jay960702 You will have to install it in development mode using the command pip install -e .. Let me know if this doesn't work.

This is necessary for the compiled cython files to be places in the same directory as the source file. See this.

I will update the installation documentation shortly.

jay960702 commented 7 years ago

Thanks, it works for me.