Image-Py / imagepy

Image process framework based on plugin like imagej, it is esay to glue with scipy.ndimage, scikit-image, opencv, simpleitk, mayavi...and any libraries based on numpy
http://imagepy.org
BSD 4-Clause "Original" or "Old" License
1.29k stars 330 forks source link

install with Building wheel for pystackreg (setup.py) ... error #64

Closed Stephenfang51 closed 4 years ago

Stephenfang51 commented 4 years ago

Dear Sir

我的系统:MacOS 安装方式 pip3 install imagepy

期望您有空可以帮我看一下 谢谢 !

Building wheel for pystackreg (setup.py) ... error
  ERROR: Complete output from command /usr/local/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/49/lx4dfjcs6dn11kb8cmsw5n600000gn/T/pip-install-4mqurchj/pystackreg/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/49/lx4dfjcs6dn11kb8cmsw5n600000gn/T/pip-wheel-d9otnkec --python-tag cp37:
  ERROR: running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.6-intel-3.7
  creating build/lib.macosx-10.6-intel-3.7/pystackreg
  copying pystackreg/version.py -> build/lib.macosx-10.6-intel-3.7/pystackreg
  copying pystackreg/__init__.py -> build/lib.macosx-10.6-intel-3.7/pystackreg
  copying pystackreg/pystackreg.py -> build/lib.macosx-10.6-intel-3.7/pystackreg
  running build_ext
  building 'pystackreg.turboreg' extension
  Warning: Can't read registry to find the necessary compiler setting
  Make sure that Python modules winreg, win32api or win32con are installed.
  C compiler: gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g

  creating build/temp.macosx-10.6-intel-3.7
  creating build/temp.macosx-10.6-intel-3.7/src
  compile options: '-Iinc/ -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c'
  extra options: '-std=c++11'
  gcc: src/pymain.cpp
  gcc: src/TurboReg.cpp
  gcc: src/TurboRegMask.cppgcc: src/TurboRegImage.cpp

  In file included from src/pymain.cpp:11:
  In file included from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
  In file included from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
  In file included from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822:
  /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
  #warning "Using deprecated NumPy API, disable it with " \
   ^
  src/pymain.cpp:207:29: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'long') in initializer list [-Wc++11-narrowing]
      npy_intp dims_mat[2] = {rm.mat.nrows(), rm.mat.ncols()};
                              ^~~~~~~~~~~~~~
  src/pymain.cpp:207:29: note: insert an explicit cast to silence this issue
      npy_intp dims_mat[2] = {rm.mat.nrows(), rm.mat.ncols()};
                              ^~~~~~~~~~~~~~
                              static_cast<npy_intp>( )
  src/pymain.cpp:207:45: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'long') in initializer list [-Wc++11-narrowing]
      npy_intp dims_mat[2] = {rm.mat.nrows(), rm.mat.ncols()};
                                              ^~~~~~~~~~~~~~
  src/pymain.cpp:207:45: note: insert an explicit cast to silence this issue
      npy_intp dims_mat[2] = {rm.mat.nrows(), rm.mat.ncols()};
                                              ^~~~~~~~~~~~~~
                                              static_cast<npy_intp>( )
  src/pymain.cpp:208:29: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'long') in initializer list [-Wc++11-narrowing]
      npy_intp dims_pts[2] = {rm.refPts.nrows(), rm.refPts.ncols()};
                              ^~~~~~~~~~~~~~~~~
  src/pymain.cpp:208:29: note: insert an explicit cast to silence this issue
      npy_intp dims_pts[2] = {rm.refPts.nrows(), rm.refPts.ncols()};
                              ^~~~~~~~~~~~~~~~~
                              static_cast<npy_intp>( )
  src/pymain.cpp:208:48: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'long') in initializer list [-Wc++11-narrowing]
      npy_intp dims_pts[2] = {rm.refPts.nrows(), rm.refPts.ncols()};
                                                 ^~~~~~~~~~~~~~~~~
  src/pymain.cpp:208:48: note: insert an explicit cast to silence this issue
      npy_intp dims_pts[2] = {rm.refPts.nrows(), rm.refPts.ncols()};
                                                 ^~~~~~~~~~~~~~~~~
                                                 static_cast<npy_intp>( )
  1 warning and 4 errors generated.
  gcc: src/TurboRegTransform.cpp
  src/TurboRegTransform.cpp:45:9: warning: unknown pragma ignored [-Wunknown-pragmas]
  #pragma warning(disable:4996)
          ^
  gcc: src/TurboRegPointHandler.cpp
  1 warning generated.
  src/TurboRegTransform.cpp:45:9: warning: unknown pragma ignored [-Wunknown-pragmas]
  #pragma warning(disable:4996)
          ^
  1 warning generated.
  error: Command "gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -Iinc/ -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/pymain.cpp -o build/temp.macosx-10.6-intel-3.7/src/pymain.o -std=c++11" failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pystackreg
  Running setup.py clean for pystackreg
Failed to build pystackreg
Installing collected packages: pystackreg, et-xmlfile, jdcal, openpyxl, xlwt, xlrd, llvmlite, numba, imagepy
  Running setup.py install for pystackreg ... error
    ERROR: Complete output from command /usr/local/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/49/lx4dfjcs6dn11kb8cmsw5n600000gn/T/pip-install-4mqurchj/pystackreg/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/49/lx4dfjcs6dn11kb8cmsw5n600000gn/T/pip-record-l5_w4xrs/install-record.txt --single-version-externally-managed --compile:
    ERROR: running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.6-intel-3.7
    creating build/lib.macosx-10.6-intel-3.7/pystackreg
    copying pystackreg/version.py -> build/lib.macosx-10.6-intel-3.7/pystackreg
    copying pystackreg/__init__.py -> build/lib.macosx-10.6-intel-3.7/pystackreg
    copying pystackreg/pystackreg.py -> build/lib.macosx-10.6-intel-3.7/pystackreg
    running build_ext
    building 'pystackreg.turboreg' extension
    Warning: Can't read registry to find the necessary compiler setting
    Make sure that Python modules winreg, win32api or win32con are installed.
    C compiler: gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g

    creating build/temp.macosx-10.6-intel-3.7
    creating build/temp.macosx-10.6-intel-3.7/src
    compile options: '-Iinc/ -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c'
    extra options: '-std=c++11'
    gcc: src/TurboReg.cpp
    gcc: src/pymain.cpp
    gcc: src/TurboRegMask.cpp
    gcc: src/TurboRegImage.cpp
    In file included from src/pymain.cpp:11:
    In file included from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
    In file included from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
    In file included from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822:
    /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
    #warning "Using deprecated NumPy API, disable it with " \
     ^
    src/pymain.cpp:207:29: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'long') in initializer list [-Wc++11-narrowing]
        npy_intp dims_mat[2] = {rm.mat.nrows(), rm.mat.ncols()};
                                ^~~~~~~~~~~~~~
    src/pymain.cpp:207:29: note: insert an explicit cast to silence this issue
        npy_intp dims_mat[2] = {rm.mat.nrows(), rm.mat.ncols()};
                                ^~~~~~~~~~~~~~
                                static_cast<npy_intp>( )
    src/pymain.cpp:207:45: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'long') in initializer list [-Wc++11-narrowing]
        npy_intp dims_mat[2] = {rm.mat.nrows(), rm.mat.ncols()};
                                                ^~~~~~~~~~~~~~
    src/pymain.cpp:207:45: note: insert an explicit cast to silence this issue
        npy_intp dims_mat[2] = {rm.mat.nrows(), rm.mat.ncols()};
                                                ^~~~~~~~~~~~~~
                                                static_cast<npy_intp>( )
    src/pymain.cpp:208:29: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'long') in initializer list [-Wc++11-narrowing]
        npy_intp dims_pts[2] = {rm.refPts.nrows(), rm.refPts.ncols()};
                                ^~~~~~~~~~~~~~~~~
    src/pymain.cpp:208:29: note: insert an explicit cast to silence this issue
        npy_intp dims_pts[2] = {rm.refPts.nrows(), rm.refPts.ncols()};
                                ^~~~~~~~~~~~~~~~~
                                static_cast<npy_intp>( )
    src/pymain.cpp:208:48: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'long') in initializer list [-Wc++11-narrowing]
        npy_intp dims_pts[2] = {rm.refPts.nrows(), rm.refPts.ncols()};
                                                   ^~~~~~~~~~~~~~~~~
    src/pymain.cpp:208:48: note: insert an explicit cast to silence this issue
        npy_intp dims_pts[2] = {rm.refPts.nrows(), rm.refPts.ncols()};
                                                   ^~~~~~~~~~~~~~~~~
                                                   static_cast<npy_intp>( )
    1 warning and 4 errors generated.
    gcc: src/TurboRegTransform.cpp
    src/TurboRegTransform.cpp:45:9: warning: unknown pragma ignored [-Wunknown-pragmas]
    #pragma warning(disable:4996)
            ^
    gcc: src/TurboRegPointHandler.cpp
    1 warning generated.
    src/TurboRegTransform.cpp:45:9: warning: unknown pragma ignored [-Wunknown-pragmas]
    #pragma warning(disable:4996)
            ^
    1 warning generated.
    error: Command "gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -Iinc/ -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/pymain.cpp -o build/temp.macosx-10.6-intel-3.7/src/pymain.o -std=c++11" failed with exit status 1
    ----------------------------------------
ERROR: Command "/usr/local/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/49/lx4dfjcs6dn11kb8cmsw5n600000gn/T/pip-install-4mqurchj/pystackreg/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/49/lx4dfjcs6dn11kb8cmsw5n600000gn/T/pip-record-l5_w4xrs/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/49/lx4dfjcs6dn11kb8cmsw5n600000gn/T/pip-install-4mqurchj/pystackreg/
WARNING: You are using pip version 19.1.1, however version 19.2.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
StephenFangdeMacBook-Pro:ImagePy stephenfang$ pip3 install imagepy
Collecting imagepy
Collecting pystackreg (from imagepy)
  Using cached https://files.pythonhosted.org/packages/24/60/d845d03364bcb77c4d468c705622061fb4409b773830e01845793ce40d7d/pystackreg-0.2.1.tar.gz
Requirement already satisfied: pydicom in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from imagepy) (1.3.0)
Requirement already satisfied: wxpython in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from imagepy) (4.0.6)
Requirement already satisfied: pypubsub in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from imagepy) (4.0.3)
Requirement already satisfied: pandas in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from imagepy) (0.24.2)
Collecting openpyxl (from imagepy)
Requirement already satisfied: scikit-image in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from imagepy) (0.15.0)
Requirement already satisfied: numpy-stl in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from imagepy) (2.10.1)
Requirement already satisfied: read-roi in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from imagepy) (1.5.2)
Collecting numba (from imagepy)
  Using cached https://files.pythonhosted.org/packages/bb/0d/db1d84ec79b223dedb72d7f1823a77797494348fea4b1809d92affea720a/numba-0.45.1-cp37-cp37m-macosx_10_9_x86_64.whl
Collecting xlrd (from imagepy)
  Using cached https://files.pythonhosted.org/packages/b0/16/63576a1a001752e34bf8ea62e367997530dc553b689356b9879339cf45a4/xlrd-1.2.0-py2.py3-none-any.whl
Requirement already satisfied: shapely in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from imagepy) (1.6.4.post2)
Collecting xlwt (from imagepy)
  Using cached https://files.pythonhosted.org/packages/44/48/def306413b25c3d01753603b1a222a011b8621aed27cd7f89cbc27e6b0f4/xlwt-1.3.0-py2.py3-none-any.whl
Requirement already satisfied: markdown in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from imagepy) (3.1)
Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pystackreg->imagepy) (1.16.2)
Requirement already satisfied: tqdm in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pystackreg->imagepy) (4.31.1)
Requirement already satisfied: six in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from wxpython->imagepy) (1.12.0)
Requirement already satisfied: pillow in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from wxpython->imagepy) (6.0.0)
Requirement already satisfied: pytz>=2011k in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pandas->imagepy) (2019.1)
Requirement already satisfied: python-dateutil>=2.5.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pandas->imagepy) (2.8.0)
Collecting et-xmlfile (from openpyxl->imagepy)
Collecting jdcal (from openpyxl->imagepy)
  Using cached https://files.pythonhosted.org/packages/f0/da/572cbc0bc582390480bbd7c4e93d14dc46079778ed915b505dc494b37c57/jdcal-1.4.1-py2.py3-none-any.whl
Requirement already satisfied: imageio>=2.0.1 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from scikit-image->imagepy) (2.5.0)
Requirement already satisfied: networkx>=2.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from scikit-image->imagepy) (2.3)
Requirement already satisfied: scipy>=0.17.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from scikit-image->imagepy) (1.2.1)
Requirement already satisfied: PyWavelets>=0.4.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from scikit-image->imagepy) (1.0.3)
Requirement already satisfied: matplotlib!=3.0.0,>=2.0.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from scikit-image->imagepy) (3.0.3)
Requirement already satisfied: python-utils>=1.6.2 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from numpy-stl->imagepy) (2.3.0)
Collecting llvmlite>=0.29.0dev0 (from numba->imagepy)
  Using cached https://files.pythonhosted.org/packages/d7/45/9216cdbf71b94ae8eefe24cfbdf4c1b9045a58f297c6e2eab5cb8d05faf3/llvmlite-0.29.0-cp37-cp37m-macosx_10_9_x86_64.whl
Requirement already satisfied: setuptools>=36 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from markdown->imagepy) (40.8.0)
Requirement already satisfied: decorator>=4.3.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from networkx>=2.0->scikit-image->imagepy) (4.4.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image->imagepy) (2.4.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image->imagepy) (1.0.1)
Requirement already satisfied: cycler>=0.10 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image->imagepy) (0.10.0)
Building wheels for collected packages: pystackreg
  Building wheel for pystackreg (setup.py) ... error
  ERROR: Complete output from command /usr/local/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/49/lx4dfjcs6dn11kb8cmsw5n600000gn/T/pip-install-2w_prpxg/pystackreg/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/49/lx4dfjcs6dn11kb8cmsw5n600000gn/T/pip-wheel-0ivmq7zr --python-tag cp37:
  ERROR: running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.6-intel-3.7
  creating build/lib.macosx-10.6-intel-3.7/pystackreg
  copying pystackreg/version.py -> build/lib.macosx-10.6-intel-3.7/pystackreg
  copying pystackreg/__init__.py -> build/lib.macosx-10.6-intel-3.7/pystackreg
  copying pystackreg/pystackreg.py -> build/lib.macosx-10.6-intel-3.7/pystackreg
  running build_ext
  building 'pystackreg.turboreg' extension
  Warning: Can't read registry to find the necessary compiler setting
  Make sure that Python modules winreg, win32api or win32con are installed.
  C compiler: gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g

  creating build/temp.macosx-10.6-intel-3.7
  creating build/temp.macosx-10.6-intel-3.7/src
  compile options: '-Iinc/ -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c'
  extra options: '-std=c++11'
  gcc: src/pymain.cpp
  gcc: src/TurboReg.cpp
  gcc: src/TurboRegMask.cppgcc: src/TurboRegImage.cpp

  In file included from src/pymain.cpp:11:
  In file included from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
  In file included from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
  In file included from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822:
  /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
  #warning "Using deprecated NumPy API, disable it with " \
   ^
  src/pymain.cpp:207:29: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'long') in initializer list [-Wc++11-narrowing]
      npy_intp dims_mat[2] = {rm.mat.nrows(), rm.mat.ncols()};
                              ^~~~~~~~~~~~~~
  src/pymain.cpp:207:29: note: insert an explicit cast to silence this issue
      npy_intp dims_mat[2] = {rm.mat.nrows(), rm.mat.ncols()};
                              ^~~~~~~~~~~~~~
                              static_cast<npy_intp>( )
  src/pymain.cpp:207:45: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'long') in initializer list [-Wc++11-narrowing]
      npy_intp dims_mat[2] = {rm.mat.nrows(), rm.mat.ncols()};
                                              ^~~~~~~~~~~~~~
  src/pymain.cpp:207:45: note: insert an explicit cast to silence this issue
      npy_intp dims_mat[2] = {rm.mat.nrows(), rm.mat.ncols()};
                                              ^~~~~~~~~~~~~~
                                              static_cast<npy_intp>( )
  src/pymain.cpp:208:29: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'long') in initializer list [-Wc++11-narrowing]
      npy_intp dims_pts[2] = {rm.refPts.nrows(), rm.refPts.ncols()};
                              ^~~~~~~~~~~~~~~~~
  src/pymain.cpp:208:29: note: insert an explicit cast to silence this issue
      npy_intp dims_pts[2] = {rm.refPts.nrows(), rm.refPts.ncols()};
                              ^~~~~~~~~~~~~~~~~
                              static_cast<npy_intp>( )
  src/pymain.cpp:208:48: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'long') in initializer list [-Wc++11-narrowing]
      npy_intp dims_pts[2] = {rm.refPts.nrows(), rm.refPts.ncols()};
                                                 ^~~~~~~~~~~~~~~~~
  src/pymain.cpp:208:48: note: insert an explicit cast to silence this issue
      npy_intp dims_pts[2] = {rm.refPts.nrows(), rm.refPts.ncols()};
                                                 ^~~~~~~~~~~~~~~~~
                                                 static_cast<npy_intp>( )
  1 warning and 4 errors generated.
  gcc: src/TurboRegTransform.cpp
  src/TurboRegTransform.cpp:45:9: warning: unknown pragma ignored [-Wunknown-pragmas]
  #pragma warning(disable:4996)
          ^
  gcc: src/TurboRegPointHandler.cpp
  1 warning generated.
  src/TurboRegTransform.cpp:45:9: warning: unknown pragma ignored [-Wunknown-pragmas]
  #pragma warning(disable:4996)
          ^
  1 warning generated.
  error: Command "gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -Iinc/ -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/pymain.cpp -o build/temp.macosx-10.6-intel-3.7/src/pymain.o -std=c++11" failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pystackreg
  Running setup.py clean for pystackreg
Failed to build pystackreg
Installing collected packages: pystackreg, et-xmlfile, jdcal, openpyxl, llvmlite, numba, xlrd, xlwt, imagepy
  Running setup.py install for pystackreg ... error
    ERROR: Complete output from command /usr/local/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/49/lx4dfjcs6dn11kb8cmsw5n600000gn/T/pip-install-2w_prpxg/pystackreg/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/49/lx4dfjcs6dn11kb8cmsw5n600000gn/T/pip-record-_odidbgb/install-record.txt --single-version-externally-managed --compile:
    ERROR: running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.6-intel-3.7
    creating build/lib.macosx-10.6-intel-3.7/pystackreg
    copying pystackreg/version.py -> build/lib.macosx-10.6-intel-3.7/pystackreg
    copying pystackreg/__init__.py -> build/lib.macosx-10.6-intel-3.7/pystackreg
    copying pystackreg/pystackreg.py -> build/lib.macosx-10.6-intel-3.7/pystackreg
    running build_ext
    building 'pystackreg.turboreg' extension
    Warning: Can't read registry to find the necessary compiler setting
    Make sure that Python modules winreg, win32api or win32con are installed.
    C compiler: gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g

    creating build/temp.macosx-10.6-intel-3.7
    creating build/temp.macosx-10.6-intel-3.7/src
    compile options: '-Iinc/ -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c'
    extra options: '-std=c++11'
    gcc: src/pymain.cpp
    gcc: src/TurboReg.cpp
    gcc: src/TurboRegMask.cpp
    gcc: src/TurboRegImage.cpp
    In file included from src/pymain.cpp:11:
    In file included from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
    In file included from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
    In file included from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822:
    /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
    #warning "Using deprecated NumPy API, disable it with " \
     ^
    src/pymain.cpp:207:29: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'long') in initializer list [-Wc++11-narrowing]
        npy_intp dims_mat[2] = {rm.mat.nrows(), rm.mat.ncols()};
                                ^~~~~~~~~~~~~~
    src/pymain.cpp:207:29: note: insert an explicit cast to silence this issue
        npy_intp dims_mat[2] = {rm.mat.nrows(), rm.mat.ncols()};
                                ^~~~~~~~~~~~~~
                                static_cast<npy_intp>( )
    src/pymain.cpp:207:45: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'long') in initializer list [-Wc++11-narrowing]
        npy_intp dims_mat[2] = {rm.mat.nrows(), rm.mat.ncols()};
                                                ^~~~~~~~~~~~~~
    src/pymain.cpp:207:45: note: insert an explicit cast to silence this issue
        npy_intp dims_mat[2] = {rm.mat.nrows(), rm.mat.ncols()};
                                                ^~~~~~~~~~~~~~
                                                static_cast<npy_intp>( )
    src/pymain.cpp:208:29: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'long') in initializer list [-Wc++11-narrowing]
        npy_intp dims_pts[2] = {rm.refPts.nrows(), rm.refPts.ncols()};
                                ^~~~~~~~~~~~~~~~~
    src/pymain.cpp:208:29: note: insert an explicit cast to silence this issue
        npy_intp dims_pts[2] = {rm.refPts.nrows(), rm.refPts.ncols()};
                                ^~~~~~~~~~~~~~~~~
                                static_cast<npy_intp>( )
    src/pymain.cpp:208:48: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'long') in initializer list [-Wc++11-narrowing]
        npy_intp dims_pts[2] = {rm.refPts.nrows(), rm.refPts.ncols()};
                                                   ^~~~~~~~~~~~~~~~~
    src/pymain.cpp:208:48: note: insert an explicit cast to silence this issue
        npy_intp dims_pts[2] = {rm.refPts.nrows(), rm.refPts.ncols()};
                                                   ^~~~~~~~~~~~~~~~~
                                                   static_cast<npy_intp>( )
    1 warning and 4 errors generated.
    gcc: src/TurboRegTransform.cpp
    src/TurboRegTransform.cpp:45:9: warning: unknown pragma ignored [-Wunknown-pragmas]
    #pragma warning(disable:4996)
            ^
    gcc: src/TurboRegPointHandler.cpp
    1 warning generated.
    src/TurboRegTransform.cpp:45:9: warning: unknown pragma ignored [-Wunknown-pragmas]
    #pragma warning(disable:4996)
            ^
    1 warning generated.
    error: Command "gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -Iinc/ -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/pymain.cpp -o build/temp.macosx-10.6-intel-3.7/src/pymain.o -std=c++11" failed with exit status 1
    ----------------------------------------
ERROR: Command "/usr/local/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/49/lx4dfjcs6dn11kb8cmsw5n600000gn/T/pip-install-2w_prpxg/pystackreg/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/49/lx4dfjcs6dn11kb8cmsw5n600000gn/T/pip-record-_odidbgb/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/49/lx4dfjcs6dn11kb8cmsw5n600000gn/T/pip-install-2w_prpxg/pystackreg/
BioinfoTongLI commented 4 years ago

Hi, @Stephenfang51, It seems to me caused by the lack of mac version pystackreg on pip and a problem of your gcc compiler. Can you update your gcc and retry? Otherwise, if you can run command lines, there is another conda based installation way: https://forum.image.sc/t/how-to-install-and-run-imagepy/21923/9

Stephenfang51 commented 4 years ago

Hi, @Stephenfang51, It seems to me caused by the lack of mac version pystackreg on pip and a problem of your gcc compiler. Can you update your gcc and retry? Otherwise, if you can run command lines, there is another conda based installation way: https://forum.image.sc/t/how-to-install-and-run-imagepy/21923/9

Dear Sir

Thanks for your reply.

I can run the program with python3 main.py. I just wonder if it's necessary to run with pystackreg ? or it's possible without it.

Thanks !

BioinfoTongLI commented 4 years ago

As long as you do not perform image alignment/registration with Pystackreg plugin in ImagePy, it's not necessary.