Giter VIP home page Giter VIP logo

chianti's People

Contributors

tobypde avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

hyuantan

chianti's Issues

unable to install in python2.7

running install
running build
running build_ext
building 'chianti' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c dataprovider.cpp -o build/temp.linux-x86_64-2.7/dataprovider.o -std=c++11 -fopenmp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1777:0,
from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
from dataprovider.cpp:2:
/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by "
^
In file included from dataprovider.cpp:5:0:
utils.h: In static member function ‘static std::string PythonUtils::objectToString(PyObject*)’:
utils.h:121:61: error: ‘PyUnicode_AsUTF8AndSize’ was not declared in this scope
return std::string(PyUnicode_AsUTF8AndSize(object, 0));
^
dataprovider.cpp: At global scope:
dataprovider.cpp:30:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
};
^
dataprovider.cpp:30:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dataprovider.cpp:30:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dataprovider.cpp:30:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dataprovider.cpp: In function ‘int PyDataProvider_init(PyDataProvider*, PyObject*, PyObject*)’:
dataprovider.cpp:280:75: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
static char keywordList[] = {"iterator", "batchsize", "augmentors", 0};
^
dataprovider.cpp:280:75: warning: deprecated conversion from string constant to ‘char
’ [-Wwrite-strings]
dataprovider.cpp:280:75: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
dataprovider.cpp: In function ‘PyObject* sequentialIterator(PyObject*, PyObject*, PyObject*)’:
dataprovider.cpp:447:45: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
static char keywordList[] = {"files", 0};
^
dataprovider.cpp: In function ‘PyObject
randomIterator(PyObject*, PyObject*, PyObject*)’:
dataprovider.cpp:485:45: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
static char keywordList[] = {"files", 0};
^
dataprovider.cpp: In function ‘PyObject
sampleIterator(PyObject*, PyObject*, PyObject*)’:
dataprovider.cpp:523:56: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
static char keywordList[] = {"files", "weights", 0};
^
dataprovider.cpp:523:56: warning: deprecated conversion from string constant to ‘char
’ [-Wwrite-strings]
dataprovider.cpp: In function ‘PyObject* subsampleAugmentor(PyObject*, PyObject*, PyObject*)’:
dataprovider.cpp:568:46: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
static char keywordList[] = {"factor", 0};
^
dataprovider.cpp: In function ‘PyObject
gammaAugmentor(PyObject*, PyObject*, PyObject*)’:
dataprovider.cpp:590:45: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
static char keywordList[] = {"gamma", 0};
^
dataprovider.cpp: In function ‘PyObject
translationAugmentor(PyObject*, PyObject*, PyObject*)’:
dataprovider.cpp:612:46: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
static char keywordList[] = {"offset", 0};
^
dataprovider.cpp: In function ‘PyObject
zoomingAugmentor(PyObject*, PyObject*, PyObject*)’:
dataprovider.cpp:634:45: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
static char *keywordList[] = {"range", 0};
^
dataprovider.cpp: At global scope:
dataprovider.cpp:679:27: error: variable ‘PyModuleDef chiantiModule’ has initializer but incomplete type
static struct PyModuleDef chiantiModule = {
^
dataprovider.cpp:680:9: error: ‘PyModuleDef_HEAD_INIT’ was not declared in this scope
PyModuleDef_HEAD_INIT,
^
In file included from /usr/include/c++/4.8/cstddef:42:0,
from /usr/local/include/opencv2/core/core.hpp:58,
from /usr/local/include/opencv2/opencv.hpp:47,
from chianti/common.h:3,
from chianti/provider.h:3,
from dataprovider.cpp:4:
dataprovider.cpp: In function ‘void PyInit_chianti()’:
dataprovider.cpp:699:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
return NULL;
^
dataprovider.cpp:701:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
return NULL;
^
dataprovider.cpp:703:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
return NULL;
^
dataprovider.cpp:705:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
return NULL;
^
dataprovider.cpp:707:39: error: ‘PyModule_Create’ was not declared in this scope
m = PyModule_Create(&chiantiModule);
^
In file included from /usr/include/c++/4.8/cstddef:42:0,
from /usr/local/include/opencv2/core/core.hpp:58,
from /usr/local/include/opencv2/opencv.hpp:47,
from chianti/common.h:3,
from chianti/provider.h:3,
from dataprovider.cpp:4:
dataprovider.cpp:709:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
return NULL;
^
dataprovider.cpp:723:12: error: return-statement with a value, in function returning 'void' [-fpermissive]
return m;
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

The problems of install chiati. How can I solve this problem?

$ python setup.py install
running install
running build
running build_ext
building 'chianti' extension
creating build
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/mnt/lustre/yangkunlin/pyuser/testpy/lib/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c dataprovider.cpp -o build/temp.linux-x86_64-2.7/dataprovider.o -std=c++11 -fopenmp
In file included from dataprovider.cpp:7:0:
utils.h: In static member function ‘static std::string PythonUtils::objectToString(PyObject*)’:
utils.h:121:61: error: ‘PyUnicode_AsUTF8AndSize’ was not declared in this scope
return std::string(PyUnicode_AsUTF8AndSize(object, 0));
^
dataprovider.cpp: At global scope:
dataprovider.cpp:804:27: error: variable ‘PyModuleDef chiantiModule’ has initializer but incomplete type
static struct PyModuleDef chiantiModule = {
^
dataprovider.cpp:805:9: error: ‘PyModuleDef_HEAD_INIT’ was not declared in this scope
PyModuleDef_HEAD_INIT,
^
In file included from /usr/include/c++/4.8.2/cstddef:42:0,
from /usr/include/opencv2/core/core.hpp:58,
from /usr/include/opencv2/opencv.hpp:47,
from chianti/common.h:3,
from chianti/provider.h:3,
from dataprovider.cpp:6:
dataprovider.cpp: In function ‘void PyInit_chianti()’:
dataprovider.cpp:824:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
return NULL;
^
dataprovider.cpp:826:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
return NULL;
^
dataprovider.cpp:828:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
return NULL;
^
dataprovider.cpp:830:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
return NULL;
^
dataprovider.cpp:832:39: error: ‘PyModule_Create’ was not declared in this scope
m = PyModule_Create(&chiantiModule);
^
In file included from /usr/include/c++/4.8.2/cstddef:42:0,
from /usr/include/opencv2/core/core.hpp:58,
from /usr/include/opencv2/opencv.hpp:47,
from chianti/common.h:3,
from chianti/provider.h:3,
from dataprovider.cpp:6:
dataprovider.cpp:834:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
return NULL;
^
dataprovider.cpp:848:12: error: return-statement with a value, in function returning 'void' [-fpermissive]
return m;
^
error: command 'gcc' failed with exit status 1

Installation problem: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Collecting git+https://github.com/TobyPDE/chianti
Cloning https://github.com/TobyPDE/chianti to /tmp/pip-de3azgei-build
Installing collected packages: Chianti
Running setup.py install for Chianti ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-de3azgei-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-x9r7_3j4-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'chianti' extension
creating build
creating build/temp.linux-x86_64-3.5
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.5/dist-packages/numpy/core/include -I/usr/include/python3.5m -c dataprovider.cpp -o build/temp.linux-x86_64-3.5/dataprovider.o -std=c++11 -fopenmp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /usr/local/lib/python3.5/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1788:0,
from /usr/local/lib/python3.5/dist-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /usr/local/lib/python3.5/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
from dataprovider.cpp:2:
/usr/local/lib/python3.5/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by "
^
In file included from dataprovider.cpp:4:0:
chianti/provider.h: In member function ‘void Chianti::TensorDataProvider::computeNextBatch()’:
chianti/provider.h:266:131: error: ‘isnan’ was not declared in this scope
if (isnan(imgs[i0 * imgsStrides[0] + _i1 * imgsStrides[1] + i2 * imgsStrides[2] + i3 * imgsStrides[3]])) {
^
chianti/provider.h:266:131: note: suggested alternative:
In file included from /usr/include/c++/5/random:38:0,
from /usr/include/c++/5/bits/stl_algo.h:66,
from /usr/include/c++/5/algorithm:62,
from /usr/local/include/opencv2/core/core.hpp:56,
from /usr/local/include/opencv2/opencv.hpp:47,
from chianti/common.h:3,
from chianti/provider.h:3,
from dataprovider.cpp:4:
/usr/include/c++/5/cmath:641:5: note: ‘std::isnan’
isnan(_Tp __x)
^
dataprovider.cpp: At global scope:
dataprovider.cpp:30:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
};
^
dataprovider.cpp:30:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
dataprovider.cpp:30:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
dataprovider.cpp:30:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
dataprovider.cpp: In function ‘int PyDataProvider_init(PyDataProvider*, PyObject*, PyObject*)’:
dataprovider.cpp:280:75: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
static char keywordList[] = {"iterator", "batchsize", "augmentors", 0};
^
dataprovider.cpp:280:75: warning: ISO C++ forbids converting a string constant to ‘char
’ [-Wwrite-strings]
dataprovider.cpp:280:75: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
dataprovider.cpp: In function ‘PyObject* sequentialIterator(PyObject*, PyObject*, PyObject*)’:
dataprovider.cpp:447:45: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
static char keywordList[] = {"files", 0};
^
dataprovider.cpp: In function ‘PyObject
randomIterator(PyObject*, PyObject*, PyObject*)’:
dataprovider.cpp:485:45: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
static char keywordList[] = {"files", 0};
^
dataprovider.cpp: In function ‘PyObject
sampleIterator(PyObject*, PyObject*, PyObject*)’:
dataprovider.cpp:523:56: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
static char keywordList[] = {"files", "weights", 0};
^
dataprovider.cpp:523:56: warning: ISO C++ forbids converting a string constant to ‘char
’ [-Wwrite-strings]
dataprovider.cpp: In function ‘PyObject* subsampleAugmentor(PyObject*, PyObject*, PyObject*)’:
dataprovider.cpp:568:46: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
static char keywordList[] = {"factor", 0};
^
dataprovider.cpp: In function ‘PyObject
gammaAugmentor(PyObject*, PyObject*, PyObject*)’:
dataprovider.cpp:590:45: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
static char keywordList[] = {"gamma", 0};
^
dataprovider.cpp: In function ‘PyObject
translationAugmentor(PyObject*, PyObject*, PyObject*)’:
dataprovider.cpp:612:46: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
static char keywordList[] = {"offset", 0};
^
dataprovider.cpp: In function ‘PyObject
zoomingAugmentor(PyObject*, PyObject*, PyObject*)’:
dataprovider.cpp:634:45: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
static char *keywordList[] = {"range", 0};
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

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

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-de3azgei-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-x9r7_3j4-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-de3azgei-build/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.