Closed hlasimpk closed 7 years ago
What is the command you run to reproduce this? Did you use ccp4-python setup.py develop
or install
?
I used ccp4-python setup.py install
.
Could this have caused the issue?
So I've run it with the develop
flag and it worked fine, out of curiosity, why doesn't install do that?
Could you try the following?
ccp4-python -m pip uninstall simbad
ccp4-python setup.py install
simbad <MTZ>
Maybe re-installing it resolves the issue. Also, cd
out of the SIMBAD directory, maybe the import
picks up the wrong directory by accident.
Tried it, same result as before. When I look in /Applications/ccp4-7.0/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/simbad-0.0.1-py2.7.egg/simbad/
I can see util
and parsers
but not static
, as if the file is not being copied across.
There seems to be an issue on OS X that puts the simbad
script not in the $CCP4/bin
directory but instead to $CCP4/Frameworks/Python.framework/Versions/2.7/bin
. The executable is not picked up and I'm not entirely sure which simbad script you are executing but not the right now.
The solution is to use the following command during installation
ccp4-python setup.py install --install-scripts $CCP4/bin --force
The --force
re-installs everything (only essential now).
Just tested out the command
ccp4-python setup.py install --install-scripts $CCP4/bin --force
This solved the issue with the simbad.exe being put in $CCP4/Frameworks/Python.framework/Versions/2.7/bin however this error still remains:
Error running main SIMBAD program: Cannot find configuration file: /Applications/ccp4-7.0/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/simbad-0.0.1-py2.7.egg/simbad/static/simbad.ini - terminating...
Maybe try the following:
$ cd ~/Downloads
$ rm -rf /Applications/ccp4-7.0/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/simbad-0.0.1-py2.7.egg /Applications/ccp4-7.0/bin/simbad
$ git clone https://github.com/rigdenlab/SIMBAD.git
$ cd SIMBAD
$ ccp4-python setup.py install --install-scripts $CCP4/bin > log 2>&1 &
$ simbad -mtz <MTZ FILE>
Let me know how that goes. If it fails, post the contents of the log
file.
I've tried your last suggestion on the setup bug. Still no solution but I can give you some extra information.
When I follow your instructions, i.e. I delete the egg files, download a new clone of SIMBAD, do setup.py install etc.. and run SIMBAD in the SIMBAD directory, the simbad.ini file in the local simbad/static dir is found (note that the static dir is not copied to the egg directory in ccp4). However this crashes when I try to run SIMBAD, here's the debug.log.
It looks like the pickle file containing the PDB information cannot be found/read which is also located in the simbad/static dir.
I also tried running this outside of the SIMBAD directory which results in the same crash I was getting before.
Please post the log file from your installation. That's much more informative about what's going on here.
It's clear that your installation doesn't move the files across to the EGG but I want to be sure.
$ find $CCP4 -name simbad* | xargs rm -rf
$ cd ~/Downloads
$ git clone https://github.com/rigdenlab/SIMBAD.git && cd SIMBAD
$ ccp4-python setup.py install --prefix $CCP4 --install-scripts $CCP4/bin
$ cd .. && rm -rf SIMBAD
$ simbad -mtz <MTZ FILE>
See if this works ...
Looks like that worked! I'm going to close this now
Let's sort the file structure to the following:
static ==> $CCP4/share scripts ==> $CCP4/bin source ==> $CCP4/lib/python2.7/site-packages
It appears as if I found a good solution to solving this entire installation problem. Changes commited to ConKit in rigdenlab/conkit@3eb47a9cf65146f0bcb50d2dcbb62f880c0d7bc6. Basic approach in ConKit consists of the following:
ccp4-python setup.py install \
--install-scripts=$CCP4/bin \
--install-lib=$CCP4/lib/py2/site-packages \
--script-python-path=ccp4-python
The first two flags --install-scripts
and --install-lib
are basic install
flags provided by setuptools. The flag --script-python-path
is a custom flag and basically adds the ccp4-python
binary to the generated scripts.
Any thoughts @hlasimpk? Do you think we should default these and leave the flags available for an installations outside of CCP4? Is this even possible or does SIMBAD depend too much on CCP4 dependencies?
Changes for installation commited in 2d0f0a66fb1cba14cc9814114c6297b4ae4006cb. Closing this issue as this seems the most pythonic and setuptools-like.