Closed jma7 closed 5 years ago
boost
(and zeromq
and gsl
) are no longer embedded (#122 ). To fix this error, you will need to install boost C++ library, either from system, or in conda. The conda include path for libboost
will be automatically detected and added. If you are not using conda, you can specify the path in environment variable LD_INCLUDE_PATH
.
Need to update the installation documents to include:
conda install -c anaconda boost
conda install gsl
I got this error after installation of current master:
(VariantTools) BSTMC07TP062G1J:VariantTools jma7$ vtools -h
Traceback (most recent call last):
File "/Users/jma7/anaconda/envs/VariantTools/bin/vtools", line 11, in <module>
load_entry_point('variant-tools==3.1.0', 'console_scripts', 'vtools')()
File "/Users/jma7/anaconda/envs/VariantTools/lib/python3.6/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/Users/jma7/anaconda/envs/VariantTools/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2843, in load_entry_point
return ep.load()
File "/Users/jma7/anaconda/envs/VariantTools/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2434, in load
return self.resolve()
File "/Users/jma7/anaconda/envs/VariantTools/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2440, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
ImportError: bad magic number in 'variant_tools': b'\x03\xf3\r\n'
I have tried remove dist, build and folder in the site-packages, then reinstall, still get this error. There is no error message during installation.
According to https://github.com/Miserlou/Zappa/issues/854
I was able to fix this too, by doing
find . -name \*.pyc -delete
. Mine definitely wasn't caused by PY2 -> PY3 upgrade, but seemed to happen spontaneously overnight.
After find . -name \*.pyc -delete
, I reinstalled variantTools.
Then I got Failed to import module (No module named '_cgatools')
.
Followed steps in https://github.com/vatlab/varianttools/issues/121
to reinstall, still have the same error.
boost 1.67.0 py36_4 anaconda
gsl 2.2.1 0
blas 1.0 mkl
If you are on a mac, please debug as follows:
src/variant_tools
if you used in-place installationotool
to check linked libraries
otool -L _cgatools.cpython-37m-darwin.so
_cgatools.cpython-37m-darwin.so:
@rpath/libboost_iostreams.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libc++.1.dylib (compatibility version 1.0.0, current version 1.0.0)
python -c 'import _cgatools'
and check the error message, you should see something like symbol not found.(VariantTools) :variant_tools jma7$ otool -L _cgatools.cpython-36m-darwin.so
_cgatools.cpython-36m-darwin.so:
@rpath/libboost_iostreams.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libboost_regex.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libboost_filesystem.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
@rpath/libbz2.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/./libstdc++.6.dylib (compatibility version 7.0.0, current version 7.19.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
(VariantTools) :variant_tools jma7$ python -c 'import _cgatools'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: dlopen(/Users/jma7/anaconda/envs/VariantTools/lib/python3.6/site-packages/variant_tools-3.1.0-py3.6-macosx-10.7-x86_64.egg/variant_tools/_cgatools.cpython-36m-darwin.so, 2): Symbol not found: __ZN5boost13match_resultsIN9__gnu_cxx17__normal_iteratorIPKcSsEESaINS_9sub_matchIS5_EEEE12maybe_assignERKS9_
Referenced from: /Users/jma7/anaconda/envs/VariantTools/lib/python3.6/site-packages/variant_tools-3.1.0-py3.6-macosx-10.7-x86_64.egg/variant_tools/_cgatools.cpython-36m-darwin.so
Expected in: flat namespace
in /Users/jma7/anaconda/envs/VariantTools/lib/python3.6/site-packages/variant_tools-3.1.0-py3.6-macosx-10.7-x86_64.egg/variant_tools/_cgatools.cpython-36m-darwin.so
It looks like you have multiple versions of boost, maybe a system one and a conda one, and the build process uses the conda include file, which is not compatible with the system boost library... Can you try to identify the boost libraries you have on your system?
Remove old boost_1_49_0, clear build, dist and site-packages/variant*, then reinstall. It is working now.
Got this error when trying to install the latest updates on mac.