hallamlab / metapathways2

MetaPathways v2.0: A master-worker model for environmental Pathway/Genome Database construction on grids and clouds
http://hallam.microbiology.ubc.ca/MetaPathways/
33 stars 14 forks source link

Problems installing python modules #68

Closed ctSkennerton closed 9 years ago

ctSkennerton commented 9 years ago

To simple problems came up when trying to install the python modules. Note that I'm on a cluster where I'm installing python stuff manually in non-standard directories. So error 1:

python setup.py install --prefix=$PWD

Traceback (most recent call last):
  File "setup.py", line 22, in <module>
    long_description=read('README'),
  File "setup.py", line 9, in read
    return open(os.path.join(os.path.dirname(__file__), fname)).read()
IOError: [Errno 2] No such file or directory: 'README'

(The file is called README.md in the release)

I fixed that in the setup.py and got Error 2:

python setup.py install --prefix=$PWD
/opt/qiime/1.8.0/python-2.7.3-release/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'classifier'
  warnings.warn(msg)
running install
running bdist_egg
running egg_info
creating MetaPathways.egg-info
writing MetaPathways.egg-info/PKG-INFO
writing top-level names to MetaPathways.egg-info/top_level.txt
writing dependency_links to MetaPathways.egg-info/dependency_links.txt
writing manifest file 'MetaPathways.egg-info/SOURCES.txt'
error: package directory 'MetaPathways_Python' does not exist

Simply making this directory seems to get the installation through

mkdir MetaPathways_Python
cts@ocean[/export/data1/sw/metapathways/2.5.1]\~> python setup.py install --prefix=$PWD
/opt/qiime/1.8.0/python-2.7.3-release/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'classifier'
  warnings.warn(msg)
running install
running bdist_egg
running egg_info
writing MetaPathways.egg-info/PKG-INFO
writing top-level names to MetaPathways.egg-info/top_level.txt
writing dependency_links to MetaPathways.egg-info/dependency_links.txt
package init file 'MetaPathways_Python/__init__.py' not found (or not a regular file)
reading manifest file 'MetaPathways.egg-info/SOURCES.txt'
writing manifest file 'MetaPathways.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
warning: install_lib: 'build/lib' does not exist -- no Python modules to install

creating build
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying MetaPathways.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying MetaPathways.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying MetaPathways.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying MetaPathways.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/MetaPathways-2.0.0-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Creating /export/data1/sw/metapathways/2.5.1/lib/python2.7/site-packages/site.py
Processing MetaPathways-2.0.0-py2.7.egg
creating /export/data1/sw/metapathways/2.5.1/lib/python2.7/site-packages/MetaPathways-2.0.0-py2.7.egg
Extracting MetaPathways-2.0.0-py2.7.egg to /export/data1/sw/metapathways/2.5.1/lib/python2.7/site-packages
Adding MetaPathways 2.0.0 to easy-install.pth file

Installed /export/data1/sw/metapathways/2.5.1/lib/python2.7/site-packages/MetaPathways-2.0.0-py2.7.egg
Processing dependencies for MetaPathways==2.0.0
Finished processing dependencies for MetaPathways==2.0.0

Although there are still warnings and there is nothing actually placed inside the MetaPathways_Python directory. Should there be?

nielshanson commented 9 years ago

We use very few python dependencies, so the code should actually run on most installations of Python 2.6 actually. Are their any dependency complaints when you do the following?

cd metapathways2
source MetaPathwaysrc
python MetaPathways.py
ctSkennerton commented 9 years ago

that does indeed work