-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing a package? Failed Install #122
Comments
Can you try with a regular virtualenv? Maybe anaconda is to blame?
…On 26 January 2017 19:11:10 CET, brianfm ***@***.***> wrote:
I just installed anaconda from a clean install and installed blosc
using pip install blosc. I am now having this import error:
In [1]: import blosc
---------------------------------------------------------------------------
ImportError Traceback (most recent call
last)
<ipython-input-1-d9d5f9fbfb2e> in <module>()
----> 1 import blosc
/usr/local/anaconda/lib/python2.7/site-packages/blosc/__init__.py in
<module>()
11
12 # Blosc C symbols that we want to export
---> 13 from blosc.blosc_extension import (
14 BLOSC_VERSION_STRING as VERSION_STRING,
15 BLOSC_VERSION_DATE as VERSION_DATE,
ImportError:
/usr/local/anaconda/lib/python2.7/site-packages/blosc/blosc_extension.so:
undefined symbol:
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm
I am running Linux Mint 18 Sarah 64-bit Kernel Linux 4.4.0-21-generic
x86_64 MATE 1.14.1
Am I missing a package when installing from pip? Thank you.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#122
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
Its not about a missing package from pip, something went wrong during compilation, I suppose.
…On 26 January 2017 19:11:10 CET, brianfm ***@***.***> wrote:
I just installed anaconda from a clean install and installed blosc
using pip install blosc. I am now having this import error:
In [1]: import blosc
---------------------------------------------------------------------------
ImportError Traceback (most recent call
last)
<ipython-input-1-d9d5f9fbfb2e> in <module>()
----> 1 import blosc
/usr/local/anaconda/lib/python2.7/site-packages/blosc/__init__.py in
<module>()
11
12 # Blosc C symbols that we want to export
---> 13 from blosc.blosc_extension import (
14 BLOSC_VERSION_STRING as VERSION_STRING,
15 BLOSC_VERSION_DATE as VERSION_DATE,
ImportError:
/usr/local/anaconda/lib/python2.7/site-packages/blosc/blosc_extension.so:
undefined symbol:
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm
I am running Linux Mint 18 Sarah 64-bit Kernel Linux 4.4.0-21-generic
x86_64 MATE 1.14.1
Am I missing a package when installing from pip? Thank you.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#122
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
I'm fairly confident it's not anaconda to blame. |
But did you actually try it? ;) |
I just tried it with the system python with the same error. pip is not compiling locally its just copying the so files into the site packages directory |
That's fairly unlikely since there are no binary packages (i.e. no package that contains a *.so file) on PyPi: https://pypi.python.org/pypi/blosc/1.4.4 -- As you can see there is only a source package. This means the package must be compiled locally in order for you to obtain a *.so file. |
Perhaps pip is caching the results of a previous compilation? Then try using the pip options that disable cache. |
Also, which version of pip are you using, |
I removed the cache: Ran: Output: and in ipython:
|
Hmmm:
It does work for me, so probably nothing to do with the setup.py |
Here is one with an empty cache:
|
Brian,
That error indicates that probably what happened is the library was
compiled but not linked. I wonder if there's anything funny about your
import paths on your system? I've not had any trouble with blosc with
Anaconda 2.7/3.4/3.5 on Ubuntu 16.04, which is more-or-less equivalent to
Mint 18.
It might be better to download the tarball and run setup.py itself because
pip often hides a lot of important information when it comes to debugging a
setuptools problem.
Robert
|
I figured it was the linking as well. I will try again from tar ball. To answer your CMake question: |
On python-blosc-1.4.4.tar.gz I opened and ran: python setup.py build_ext --inplace python setup.py install Installed /usr/local/anaconda/lib/python2.7/site-packages/blosc-1.4.4-py2.7-linux-x86_64.egg Tried test.py: python test.py |
warning: no files found matching '*.cpp' under directory 'c-blosc'
warning: no files found matching '*.hpp' under directory 'c-blosc'
Clearly it's not building the c-blosc backend at all, as the amount of
output would be far larger if it did. Could it be a problem with cmake or
gcc?
I just built it with gcc 5.4.0 and cmake 3.5.1.
|
cmake -DCMAKE_INSTALL_PREFIX="/usr/local" Target "blosc_static" of type "STATIC_LIBRARY" has the following visibility
For compatibility CMake is not honoring them for this target. -- Generating done ~/Downloads/python-blosc-1.4.4/c-blosc $ cmake --build . (I confirmed using gcc 5.4.0 and cmake 3.5.1) |
Ok, so we see the error now, and as suspected it didn't get linked after compilation. Somehow
from the |
From my .bashrc: export LD_LIBRARY_PATH=/usr/local/lib:/usr/bin:/usr/lib/gcc/x86_64-linux-gnu/5.4.0:$LD_LIBRARY_PATH ~/Downloads/python-blosc-1.4.4/c-blosc $ cmake . Target "blosc_static" of type "STATIC_LIBRARY" has the following visibility
For compatibility CMake is not honoring them for this target. -- Generating done ~/Downloads/python-blosc-1.4.4/c-blosc $ cmake --build . |
IIRC the setup.py will not invoke CMake (but might be mistaken) |
Yeah, but CMake failing is an indication that something is not working properly in OP machine. As @robbmcleod said, this smells like an issue with the C++ libraries (which is quite strange). @brianfm could you try with disabling snappy (the only codec that needs C++) with:
If that works, I suggest to comment this line and set |
Hello - thank you all again for the help. I just ran: And it finished without error (Built target bench). Should I now cmake --build . --target install? Or go back, comment out the code you have set aside, and run from setup.py? Thank you. |
Yes, you can do both. If you opt by installing the C library in the system, then you can tell the python installer where to find the library with:
|
cmake -DDEACTIVATE_SNAPPY=ON -DCMAKE_INSTALL_PREFIX="/usr/lib" . ctest: cmake --build . --target install python setup.py build_ext --blosc="/usr/local" python setup.py install Installed /usr/local/anaconda/lib/python2.7/site-packages/blosc-1.4.4-py2.7-linux-x86_64.egg python -c "import blosc; print(blosc.version)" |
Mmh, you should either remove the old |
That makes sense. I went out and deleted and cleared cache. After clearing cache, I ran: Output: File "build/bdist.linux-x86_64/egg/blosc/blosc_extension.py", line 7, in Why is it picking up on the cache again? Thank you again, I appreciate at all the help. |
I am not sure how this cache works, but it looks like that the problem with shared libraries is appearing again. I am getting out of ideas, so not sure what to recommend. It might be a good idea to clean everything related with Blosc in your system and start anew. |
Thank you for the help. I will try this on Monday and report back. |
Thank you all for the help. |
I am also facing this issue with Anaconda. On normal system it works fine. @brianfm did you solve it? |
I was able to solve it - finally! This is what I did.
then: then:
From there I ran: Lastly, I set up my Library Path in .bashrc to point to: Once all of that was done, I was able to import blosc in python. I hope this helps. Took me a while to get it running. |
I just installed anaconda from a clean install and installed blosc using pip install blosc. I am now having this import error:
In [1]: import blosc
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
in ()
----> 1 import blosc
/usr/local/anaconda/lib/python2.7/site-packages/blosc/init.py in ()
11
12 # Blosc C symbols that we want to export
---> 13 from blosc.blosc_extension import (
14 BLOSC_VERSION_STRING as VERSION_STRING,
15 BLOSC_VERSION_DATE as VERSION_DATE,
ImportError: /usr/local/anaconda/lib/python2.7/site-packages/blosc/blosc_extension.so: undefined symbol: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm
I am running Linux Mint 18 Sarah 64-bit Kernel Linux 4.4.0-21-generic x86_64 MATE 1.14.1
Am I missing a package when installing from pip? Thank you.
The text was updated successfully, but these errors were encountered: