allind / EukDetect

MIT License
43 stars 16 forks source link

No package metadata was found for EukDetect #20

Closed justinshaffer closed 2 years ago

justinshaffer commented 2 years ago

Hello,

I'm running into an error after installing EukDetect following the instructions listed here.

Here is what prints to screen when I run the test:

python tests/test_eukdetect.py 
EEEE.
======================================================================
ERROR: test_class (__main__._01_HelpText)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_eukdetect.py", line 18, in test_class
    code, stdout, stderr = run(command)
  File "tests/test_eukdetect.py", line 11, in run
    process = subprocess.run(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/home/jpshaffer/software/miniconda3/lib/python3.8/subprocess.py", line 493, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/home/jpshaffer/software/miniconda3/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/home/jpshaffer/software/miniconda3/lib/python3.8/subprocess.py", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'eukdetect'

======================================================================
ERROR: test_class (__main__._02_RunRunall)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_eukdetect.py", line 25, in test_class
    code, stdout, stderr = run(command)
  File "tests/test_eukdetect.py", line 11, in run
    process = subprocess.run(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/home/jpshaffer/software/miniconda3/lib/python3.8/subprocess.py", line 493, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/home/jpshaffer/software/miniconda3/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/home/jpshaffer/software/miniconda3/lib/python3.8/subprocess.py", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'eukdetect'

======================================================================
ERROR: test_class (__main__._03_RunAlnCmd)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_eukdetect.py", line 32, in test_class
    code, stdout, stderr = run(command)
  File "tests/test_eukdetect.py", line 11, in run
    process = subprocess.run(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/home/jpshaffer/software/miniconda3/lib/python3.8/subprocess.py", line 493, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/home/jpshaffer/software/miniconda3/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/home/jpshaffer/software/miniconda3/lib/python3.8/subprocess.py", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'eukdetect'

======================================================================
ERROR: test_class (__main__._04_RunAln_and_filter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_eukdetect.py", line 40, in test_class
    alncode, alnstdout, alnstderr = run(command)
  File "tests/test_eukdetect.py", line 11, in run
    process = subprocess.run(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/home/jpshaffer/software/miniconda3/lib/python3.8/subprocess.py", line 493, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/home/jpshaffer/software/miniconda3/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/home/jpshaffer/software/miniconda3/lib/python3.8/subprocess.py", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'eukdetect'

----------------------------------------------------------------------
Ran 5 tests in 0.011s

FAILED (errors=4)

This is what prints to screen when running help:

eukdetect --help
Traceback (most recent call last):
  File "/home/jpshaffer/software/miniconda3/bin/eukdetect", line 33, in <module>
    sys.exit(load_entry_point('EukDetect==1.0.1', 'console_scripts', 'eukdetect')())
  File "/home/jpshaffer/software/miniconda3/bin/eukdetect", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
  File "/home/jpshaffer/software/miniconda3/envs/eukdetect/lib/python3.6/site-packages/importlib_metadata/__init__.py", line 558, in distribution
    return Distribution.from_name(distribution_name)
  File "/home/jpshaffer/software/miniconda3/envs/eukdetect/lib/python3.6/site-packages/importlib_metadata/__init__.py", line 215, in from_name
    raise PackageNotFoundError(name)
importlib_metadata.PackageNotFoundError: No package metadata was found for EukDetect

I did not receive any errors during installation - here is what printed to screen during installation:

python setup.py install
running install
/home/jpshaffer/software/miniconda3/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/home/jpshaffer/software/miniconda3/lib/python3.8/site-packages/setuptools/command/easy_install.py:158: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
running bdist_egg
running egg_info
writing EukDetect.egg-info/PKG-INFO
writing dependency_links to EukDetect.egg-info/dependency_links.txt
writing entry points to EukDetect.egg-info/entry_points.txt
writing top-level names to EukDetect.egg-info/top_level.txt
reading manifest file 'EukDetect.egg-info/SOURCES.txt'
adding license file 'LICENSE'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
copying build/lib/eukdetect/runall.py -> build/bdist.linux-x86_64/egg/eukdetect
copying build/lib/eukdetect/__init__.py -> build/bdist.linux-x86_64/egg/eukdetect
copying build/lib/eukdetect/count_primary_and_secondary.py -> build/bdist.linux-x86_64/egg/eukdetect
copying build/lib/eukdetect/bam_to_pid.py -> build/bdist.linux-x86_64/egg/eukdetect
copying build/lib/eukdetect/eukdb_config_create.py -> build/bdist.linux-x86_64/egg/eukdetect
zip_safe flag not set; analyzing archive contents...
creating 'dist/EukDetect-1.0.1-py3.8.egg' and adding 'build/bdist.linux-x86_64/egg' to it
Processing EukDetect-1.0.1-py3.8.egg
EukDetect 1.0.1 is already the active version in easy-install.pth
Installing eukdetect script to /home/jpshaffer/software/miniconda3/bin

Installed /home/jpshaffer/software/miniconda3/lib/python3.8/site-packages/EukDetect-1.0.1-py3.8.egg
Processing dependencies for EukDetect==1.0.1
Finished processing dependencies for EukDetect==1.0.1

I'm running on a Linux cluster: conda 4.11.0 Python 3.8.12

Please let me know if you have any insight into this issue, and thanks in advance for your help and the tool.

allind commented 2 years ago

Hi Justin,

Thanks for reaching out and thanks for your interest. I haven't been able to reproduce this error. What happens when you open a python shell from within this conda env and run import eukdetect?

justinshaffer commented 2 years ago

Thank you! The issue turned out to be with my miniconda environment not properly detecting the EukDetect environment during installation, and specifically that the wrong version of Python (3.8) was being called.