Skip to content
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

Ubuntu Installation Error #24

Closed
tkurtzman opened this issue May 5, 2017 · 18 comments
Closed

Ubuntu Installation Error #24

tkurtzman opened this issue May 5, 2017 · 18 comments

Comments

@tkurtzman
Copy link
Contributor

Installation went without error. However, when I run_has, I get the following:

tkurtzman@ubuntu:~$ run_hsa
Traceback (most recent call last):
File "/home/tkurtzman/anaconda2/bin/run_hsa", line 11, in
load_entry_point('sstmap==1.0', 'console_scripts', 'run_hsa')()
File "/home/tkurtzman/anaconda2/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/pkg_resources/init.py", line 565, in load_entry_point
File "/home/tkurtzman/anaconda2/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/pkg_resources/init.py", line 2598, in load_entry_point
File "/home/tkurtzman/anaconda2/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/pkg_resources/init.py", line 2258, in load
File "/home/tkurtzman/anaconda2/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/pkg_resources/init.py", line 2264, in resolve
File "/home/tkurtzman/anaconda2/lib/python2.7/site-packages/sstmap/init.py", line 41, in
from sstmap import site_water_analysis, grid_water_analysis, utils
File "/home/tkurtzman/anaconda2/lib/python2.7/site-packages/sstmap/site_water_analysis.py", line 43, in
import _sstmap_entropy as ext1
ImportError: /home/tkurtzman/anaconda2/lib/python2.7/site-packages/scipy/sparse/../../../../libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/tkurtzman/anaconda2/lib/python2.7/site-packages/_sstmap_entropy.so)

@kamran-haider
Copy link
Contributor

kamran-haider commented May 5, 2017

@tkurtzman

I just rebuilt it and uploaded to anaconda channel.

Can you try the following:

conda create -n "test_sstmap_install"
source activate  "test_sstmap_install"
conda config --add channels omnia
conda config --add channels solvationtools
conda install sstmap
~/anaconda2/envs/test_sstmap_install/bin/run_hsa -h

This is just to test the new build in a different conda enviornment (keeping the old one intact). Once it starts working, will show how to update the main installation.

In order to get out of test_sstmap_install environment, just type:

source deactivate test_sstmap_install

@gosldorf
Copy link
Collaborator

gosldorf commented May 5, 2017

Hi,

Just wanted to say I'm also getting the same error after installing on mac, details below. The previous numpy issue I had was due to a previous installation of anaconda being installed on my system.

/Users/stevenramsey/anaconda2/lib/python2.7/site-packages/matplotlib/font_manager.py:280: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
'Matplotlib is building the font cache using fc-list. '
Traceback (most recent call last):
File "/Users/stevenramsey/anaconda2/bin/run_hsa", line 11, in
load_entry_point('sstmap==1.0', 'console_scripts', 'run_hsa')()
File "/Users/stevenramsey/anaconda2/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/pkg_resources/init.py", line 565, in load_entry_point
File "/Users/stevenramsey/anaconda2/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/pkg_resources/init.py", line 2598, in load_entry_point
File "/Users/stevenramsey/anaconda2/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/pkg_resources/init.py", line 2258, in load
File "/Users/stevenramsey/anaconda2/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/pkg_resources/init.py", line 2264, in resolve
File "/Users/stevenramsey/anaconda2/lib/python2.7/site-packages/sstmap/init.py", line 41, in
from sstmap import site_water_analysis, grid_water_analysis, utils
File "/Users/stevenramsey/anaconda2/lib/python2.7/site-packages/sstmap/site_water_analysis.py", line 43, in
import _sstmap_entropy as ext1
ImportError: dlopen(/Users/stevenramsey/anaconda2/lib/python2.7/site-packages/_sstmap_entropy.so, 2): Symbol not found: __ZNKSt5ctypeIcE13_M_widen_initEv
Referenced from: /Users/stevenramsey/anaconda2/lib/python2.7/site-packages/_sstmap_entropy.so
Expected in: /usr/lib/libstdc++.6.dylib
in /Users/stevenramsey/anaconda2/lib/python2.7/site-packages/_sstmap_entropy.so

@kamran-haider
Copy link
Contributor

@gosldorf Thanks. Can you also create a new conda environment as I showed above and test the new installation?

Thanks

@gosldorf
Copy link
Collaborator

gosldorf commented May 5, 2017

@kamran-haider Yup just did, following the instructions, ended up with the same error messages (full message below).

(test_sstmap_install) stevenramsey@Stevens-MBP-3:~/Downloads$ ~/anaconda2/envs/test_sstmap_install/bin/run_hsa -h

/Users/stevenramsey/anaconda2/envs/test_sstmap_install/lib/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
Traceback (most recent call last):
File "/Users/stevenramsey/anaconda2/envs/test_sstmap_install/bin/run_hsa", line 11, in
load_entry_point('sstmap==1.0', 'console_scripts', 'run_hsa')()
File "/Users/stevenramsey/anaconda2/envs/test_sstmap_install/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/pkg_resources/init.py", line 565, in load_entry_point
File "/Users/stevenramsey/anaconda2/envs/test_sstmap_install/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/pkg_resources/init.py", line 2598, in load_entry_point
File "/Users/stevenramsey/anaconda2/envs/test_sstmap_install/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/pkg_resources/init.py", line 2258, in load
File "/Users/stevenramsey/anaconda2/envs/test_sstmap_install/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/pkg_resources/init.py", line 2264, in resolve
File "/Users/stevenramsey/anaconda2/envs/test_sstmap_install/lib/python2.7/site-packages/sstmap/init.py", line 41, in
from sstmap import site_water_analysis, grid_water_analysis, utils
File "/Users/stevenramsey/anaconda2/envs/test_sstmap_install/lib/python2.7/site-packages/sstmap/site_water_analysis.py", line 43, in
import _sstmap_entropy as ext1
ImportError: dlopen(/Users/stevenramsey/anaconda2/envs/test_sstmap_install/lib/python2.7/site-packages/_sstmap_entropy.so, 2): Symbol not found: __ZNKSt5ctypeIcE13_M_widen_initEv
Referenced from: /Users/stevenramsey/anaconda2/envs/test_sstmap_install/lib/python2.7/site-packages/_sstmap_entropy.so
Expected in: /usr/lib/libstdc++.6.dylib
in /Users/stevenramsey/anaconda2/envs/test_sstmap_install/lib/python2.7/site-packages/_sstmap_entropy.so

@kamran-haider
Copy link
Contributor

@tkurtzman @gosldorf

I think conda install sstmap is installing pre-compiled binaries for our c/c++ modules, which for some reason are not working. In order to make sure if this is exactly the issue, can you try installing from the source.

source activate test_sstmap_install
conda remove sstmap
git clone git@github.com:KurtzmanLab/SSTMap.git
cd SSTMap
python setup.py install
run_hsa -h
run_gist -h

@gosldorf
Copy link
Collaborator

gosldorf commented May 5, 2017

That worked!

(test_sstmap_install) stevenramsey@Stevens-MBP-3:~/SSTMap$ run_hsa -h
usage: run_hsa [-h] -i INPUT_PARM -t INPUT_TRAJ [-c CLUSTERS] -l LIGAND
[-f NUM_FRAMES] [-s START_FRAME] [-o OUTPUT_PREFIX]

Run GIST calculations through command-line.

optional arguments:
-h, --help show this help message and exit
-i INPUT_PARM, --input_parm INPUT_PARM
Input toplogy File.
-t INPUT_TRAJ, --input_traj INPUT_TRAJ
Input trajectory file.
-c CLUSTERS, --clusters CLUSTERS
PDB file containing cluster centers.
-l LIGAND, --ligand LIGAND
Input ligand PDB file.
-f NUM_FRAMES, --num_frames NUM_FRAMES
Total number of frames to process.
-s START_FRAME, --start_frame START_FRAME
Starting frame.
-o OUTPUT_PREFIX, --output_prefix OUTPUT_PREFIX
Prefix for all the results files.

@kamran-haider
Copy link
Contributor

@gosldorf That's good. I will look into the issue with conda install and will update.

@tkurtzman
Copy link
Contributor Author

This doesn't work for me. I get the same set of errors in Ubuntu...

source activate test_sstmap_install
conda remove sstmap
git clone git@github.com:KurtzmanLab/SSTMap.git
cd SSTMap
python setup.py install
run_hsa -h
run_gist -h

@kamran-haider
Copy link
Contributor

@tkurtzman Sorry, I forgot to add, you will have to do:

~/anaconda2/envs/test_sstmap_install/bin/run_hsa -h
~/anaconda2/envs/test_sstmap_install/bin/run_gist -h

I think your run_hsa is pointing to the previous installation.

@kamran-haider
Copy link
Contributor

kamran-haider commented May 9, 2017

@tkurtzman @gosldorf @acruzpr

This is turning out to be a little more challenging. The problem is that conda probably doesn't support compiling distributions through conda install, as far as I have understood. This means we may keep running into issues where our pre-compiled code does not behave well with the local python installations on user's machine. On the other hand, I can see that SSTMap compiles fine from the source in most cases. After doing some more research on the issue, I have found that when a package needs to be built from the source for proper installation and running, an alternative packaging method called pip is more suitable. See this and this for more details. The nice thing in our favor is that pip ships with Anaconda so user doesn't have to worry about it and the commands are also simple e..g, pip install sstmap. I am figuring out right now, if pip can also resolve dependcies, should be able to do so coz all four of our dependencies (numpy, scipy, ParmEd, MDTraj) are available as pip packages. Of course, we can just stick to asking users that if they need to compile SSTMap from source, they can obtain the code from Github etc.

I think setting up a pip package for SSTMap should be straight-forward, it's worth a shot. I will let you know how it goes and will probably ask you guys to test the pip install sstmap command.
Finally, if we go this route, we will have to edit the draft and sstmap.org along the lines: "SSTMap can be obtained either as a pre-compiled build package through conda or can be build using source distribution through pip...." Let me know what you guys think.

@tkurtzman
Copy link
Contributor Author

It would be nice to have a simple command to install so I think it is worthwhile to try to get pip to install. I'm not wild about having two different installation protocols outlined in the paper.

What do you mean that "SSTMap compiles fine from the source in most cases"? What are the exceptions?

Tom

@acruzpr
Copy link
Contributor

acruzpr commented May 9, 2017 via email

@kamran-haider
Copy link
Contributor

kamran-haider commented May 10, 2017

@acruzpr It is dynamic. All of our c/c++ code is built as python c/c++ extensions. The libstdc that's required by these extensions is dynamically loaded by Python interpreter at runtime. In this particular case, the Python interpreter is picking the library from a 'wrong place'. Scipy should have nothing to do with how our extensions are built. So that's one pointer for me to look further.

This is a good point. Now that I think about it, there may be a way to statically link the library. Let me see if I can make some changes to setup.py to allow this. Will keep you guys posted.

@kamran-haider
Copy link
Contributor

@tkurtzman if possible can you post the output of locate libstd* here.

@kamran-haider
Copy link
Contributor

Our issue appears to be similar to:

ContinuumIO/anaconda-issues#483

I think I am going to try a fix that they suggested.

@kamran-haider
Copy link
Contributor

@gosldorf
So I rebuilt the conda package with a potential fix (did this for macosx version only, if succeeded, will do the same for linux too). We can try this during our meeting today but just putting it out there.

I am assuming you can still reproduce the error (not in your test_sstmap_install environment, where your built sstmap from source but in your default anaconda environment). To make sure you can reproduce, just deactivate any environment your are in and do run_hsa -h and the same error that you reported should happen.

Once you are able to reproduce, can you reinstall and then try to reproduce the error:

conda remove sstmap
conda install -c solvationtools sstmap

@gosldorf
Copy link
Collaborator

gosldorf commented May 10, 2017 via email

@kamran-haider
Copy link
Contributor

Thanks @gosldorf for confirmation. @tkurtzman also confirmed just now that Ubuntu and CentOS installation went fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants