phac-nml / mob-suite

MOB-suite: Software tools for clustering, reconstruction and typing of plasmids from draft assemblies
Apache License 2.0
124 stars 33 forks source link

2.0.0 FileNotFound: lib/python3.7/site-packages/mob_suite/config.json #32

Closed tseemann closed 5 years ago

tseemann commented 5 years ago
% pip3 install mob-suite

% pip3 show mob-suite

Name: mob-suite
Version: 2.0.0
Summary: mob_suite is a set of tools for finding, typing and reconstruction of plasmids from draft and complete genome assemblies.
Home-page: https://github.com/phac-nml/mob-suite
Author: James Robertson, Kyrylo Bessonov
Author-email: james.robertson@canada.ca
License: GPLv3
Location: /home/linuxbrew/.linuxbrew/lib/python3.7/site-packages
Requires: pandas, pyqt5, pandas, biopython, pycurl, numpy, tables, scipy, ete3
Required-by:

% mob_typer --version

Traceback (most recent call last):
  File "/home/linuxbrew/.linuxbrew/bin/mob_typer", line 5, in <module>
    from mob_suite.mob_typer import main
  File "/home/linuxbrew/.linuxbrew/opt/python/lib/python3.7/site-packages/mob_suite/mob_typer.py", line 9, in <module>
    import mob_suite.mob_init
  File "/home/linuxbrew/.linuxbrew/opt/python/lib/python3.7/site-packages/mob_suite/mob_init.py", line 18, in <module>
    with open(config_path, 'r') as configfile:
FileNotFoundError: [Errno 2] No such file or directory: '/home/linuxbrew/.linuxbrew/lib/python3.7/site-packages/mob_suite/config.json'
kbessonov1984 commented 5 years ago

Hello, Torsten, We were more focusing on the conda package which does not display this issue. The config.json file specifies download mirrors and was added as PR request from one of our contributors. The missing file can be safely copied from the github repo to the /home/linuxbrew/.linuxbrew/lib/python3.7/site-packages/mob_suite directory. We will fix pip install shortly. Thank you for reporting

tseemann commented 5 years ago

Thanks @kbessonov1984 - I was hoping 2.0.1 would fix it, but i'll wait until 2.0.2 to make a brew package

kbessonov1984 commented 5 years ago

@tseemann We've missed config.json in MANIFEST.in. James will update the PyPI repository with the 2.0.1 and 2.0.0 versions shortly. For now, the best way is to clone the most recent revision (264d1d96e6e7762b428ce0ef5ceb9c6db402cb17) and install package from the package folder directly as follows

% git clone mob_suite 
% cd ./mob_suite && pip install .
% mob_recon --version
% mob_typer --version
% mob_hostrange --version
% mob_init
2019-11-03 20:07:37,637 INFO: Database directory folder already exists at /Drives/K/kbessono/.conda/envs/mobsuitepip/lib/python3.7/site-packages/mob_suite/databases [in /home/CSCScience.ca/kbessono/.conda/envs/mobsuitepip/lib/python3.7/site-packages/mob_suite/mob_init.py:128]
2019-11-03 20:07:37,643 INFO: Placed lock file at /Drives/K/kbessono/.conda/envs/mobsuitepip/lib/python3.7/site-packages/mob_suite/databases/.lock [in /home/CSCScience.ca/kbessono/.conda/envs/mobsuitepip/lib/python3.7/site-packages/mob_suite/mob_init.py:139]
...
2019-11-03 20:21:31,623 INFO: MOB init completed successfully [in /home/CSCScience.ca/kbessono/.conda/envs/mobsuitepip/lib/python3.7/site-packages/mob_suite/mob_init.py:241]
jrober84 commented 5 years ago

PYPI has been updated with 2.01 which has fixed the issue with the missing config.json. @tseeman if you can confirm this issue is resolved for you as well, I will close the issue

kbessonov1984 commented 5 years ago

I've also just checked the new PyPI mob_suite 2.0.1 package published at https://pypi.org/project/mob-suite/2.0.1/ inside a plain minimal install Debian 9.5 Linux container and it worked OK via plain pip install mob_suite command. Only pycurl required install of the openssl library dependencies mentioned in issue #33

tseemann commented 5 years ago

2.0.1 works now! thank you