Comments (9)
This error indicates that the setup script cannot find the opencv shared libraries. Make sure that they are available in der LD_LIBRARY_PATH.
from chianti.
I used sudo pip3 install git+https://github.com/TobyPDE/chianti
from chianti.
Can you try again now?
from chianti.
Collecting git+https://github.com/TobyPDE/chianti
Cloning https://github.com/TobyPDE/chianti to /tmp/pip-md7aalnl-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-md7aalnl-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-dxrlfevu-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 "
^
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};
^
creating build/lib.linux-x86_64-3.5
x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.5/dataprovider.o -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_imgcodecs -o build/lib.linux-x86_64-3.5/chianti.cpython-35m-x86_64-linux-gnu.so -lgomp
/usr/bin/ld: cannot find -lopencv_imgcodecs
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-g++' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-md7aalnl-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-dxrlfevu-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-md7aalnl-build/
from chianti.
Getting a different error now.
from chianti.
You might need to run it with sudo -E in order for your environment variables to be available in super user mode.
from chianti.
Solved it! Thanks
from chianti.
ok I got the same issue. So I did locate my OpenCV libraries and include files wth the command "pkg-config --libs --cflags opencv", which returns:
pkg-config --libs --cflags opencv
-I/usr/local/include/opencv -I/usr/local/include -L/usr/local/lib -lopencv_cudabgsegm -lopencv_cudaobjdetect -lopencv_cudastereo -lopencv_stitching -lopencv_cudafeatures2d -lopencv_superres -lopencv_cudacodec -lopencv_videostab -lopencv_cudaoptflow -lopencv_cudalegacy -lopencv_cudawarping -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dpm -lopencv_freetype -lopencv_fuzzy -lopencv_hdf -lopencv_line_descriptor -lopencv_optflow -lopencv_reg -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_rgbd -lopencv_surface_matching -lopencv_tracking -lopencv_datasets -lopencv_text -lopencv_face -lopencv_plot -lopencv_dnn -lopencv_xfeatures2d -lopencv_shape -lopencv_video -lopencv_ximgproc -lopencv_calib3d -lopencv_features2d -lopencv_flann -lopencv_xobjdetect -lopencv_objdetect -lopencv_ml -lopencv_xphoto -lopencv_highgui -lopencv_videoio -lopencv_photo -lopencv_imgcodecs -lopencv_cudaimgproc -lopencv_cudafilters -lopencv_imgproc -lopencv_cudaarithm -lopencv_core -lopencv_cudev
I did export the three paths under $LD_LIBRARY_PATH, but when doing "sudo -E pip install git+https://github.com/TobyPDE/chianti" I still have the same error as above, which ends by:
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-Dt3JrW-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-upTGyc-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-Dt3JrW-build/
Can you tell me what I am doing wrong here?
thank you
Tets
from chianti.
SRK97, can you pls share what you did exactly that fixed it? thanks
Tets
from chianti.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chianti.