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

ModuleNotFoundError: No module named 'analyze' #15

Open
Nifaste opened this issue Jul 24, 2018 · 5 comments
Open

ModuleNotFoundError: No module named 'analyze' #15

Nifaste opened this issue Jul 24, 2018 · 5 comments

Comments

@Nifaste
Copy link

Nifaste commented Jul 24, 2018

Hi !
I just install alignqc with pip (I tried with conda but solving environment is quite long).
I have the following error :

alignqc analysis -h
Traceback (most recent call last):
File "/opt/conda/envs/alignqc/bin/alignqc", line 7, in
from alignqc.alignqc import entry_point
File "/opt/conda/envs/alignqc/lib/python3.7/site-packages/alignqc/alignqc.py", line 6, in
import analyze
ModuleNotFoundError: No module named 'analyze'

Any help ?
Thanks

@Nifaste
Copy link
Author

Nifaste commented Jul 24, 2018

Ooops, i found the problem.
I had python v3.7 installed and with python2.7 it's ok !
Sorry :s

@PertuyF
Copy link

PertuyF commented Jul 24, 2018

Just to mention, this could probably be solved using explicit relative imports for all the modules packed in AlignQC.

from __future__ import absolute_import  # Not necessary for python 2.6+

from . import analyze
# Or any other module at the same location as __file__

BTW, I would be interested by a Python 3 compatible version of alignQC, is the migration planned @jason-weirather?

@shaniAmare
Copy link

Hi,

I also get this same error still when trying to run AlignQC through Python 3.7.0. So guess it has not been fixed. Furthermore, when you said "I had python v3.7 installed and with python2.7 it's ok !" can you please explain whether you reinstalled AlignQC using python 2.7 or ran the already installed tool in python 2.7, @Nifaste? I can't seem to use the AlignQC version I installed through python 3.7.0 through python 2.7 when I use pip to install.

So I tried to install AlignQC using python 2.7.12 and I get the following set of errors:
pip install --user AlignQC

Traceback (most recent call last):
  File "/stornext/System/data/apps/python/python-2.7.12/bin/pip", line 6, in <module>
    from pip._internal import main
  File "/stornext/System/data/apps/python/python-2.7.12/lib/python2.7/site-packages/pip/_internal/__init__.py", line 40, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/stornext/System/data/apps/python/python-2.7.12/lib/python2.7/site-packages/pip/_internal/cli/autocompletion.py", line 8, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/stornext/System/data/apps/python/python-2.7.12/lib/python2.7/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
    from pip._internal.cli import cmdoptions
  File "/stornext/System/data/apps/python/python-2.7.12/lib/python2.7/site-packages/pip/_internal/cli/cmdoptions.py", line 24, in <module>
    from pip._internal.models.search_scope import SearchScope
  File "/stornext/System/data/apps/python/python-2.7.12/lib/python2.7/site-packages/pip/_internal/models/search_scope.py", line 11, in <module>
    from pip._internal.utils.misc import normalize_path, redact_password_from_url
  File "/stornext/System/data/apps/python/python-2.7.12/lib/python2.7/site-packages/pip/_internal/utils/misc.py", line 21, in <module>
    from pip._vendor import pkg_resources
  File "/stornext/System/data/apps/python/python-2.7.12/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3241, in <module>
    @_call_aside
  File "/stornext/System/data/apps/python/python-2.7.12/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3225, in _call_aside
    f(*args, **kwargs)
  File "/stornext/System/data/apps/python/python-2.7.12/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3254, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/stornext/System/data/apps/python/python-2.7.12/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 574, in _build_master
    ws = cls()
  File "/stornext/System/data/apps/python/python-2.7.12/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 567, in __init__
    self.add_entry(entry)
  File "/stornext/System/data/apps/python/python-2.7.12/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 623, in add_entry
    for dist in find_distributions(entry, True):
  File "/stornext/System/data/apps/python/python-2.7.12/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2056, in find_on_path
    for dist in factory(fullpath):
  File "/stornext/System/data/apps/python/python-2.7.12/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2126, in distributions_from_metadata
    root, entry, metadata, precedence=DEVELOP_DIST,
  File "/stornext/System/data/apps/python/python-2.7.12/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2583, in from_location
    py_version=py_version, platform=platform, **kw
  File "/stornext/System/data/apps/python/python-2.7.12/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2985, in _reload_version
    md_version = self._get_version()
  File "/stornext/System/data/apps/python/python-2.7.12/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2763, in _get_version
    version = _version_from_file(lines)
  File "/stornext/System/data/apps/python/python-2.7.12/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2547, in _version_from_file
    line = next(iter(version_lines), '')
  File "/stornext/System/data/apps/python/python-2.7.12/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2758, in _get_metadata
    for line in self.get_metadata_lines(name):
  File "/stornext/System/data/apps/python/python-2.7.12/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1902, in get_metadata_lines
    return yield_lines(self.get_metadata(name))
  File "/stornext/System/data/apps/python/python-2.7.12/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1888, in get_metadata
    with io.open(self.path, encoding='utf-8', errors="replace") as f:
IOError: [Errno 1] Operation not permitted: '/stornext/Home/data/.local/lib/python2.7/site-packages/mlpy-3.5.0-py2.7.egg-info'

How can this be solved @jason-weirather ? Would be great to hear your expert advice!

Thanks heaps,
Shani.

@shaniAmare
Copy link

OK, so this error seems to be gone when using the conda installation.

@SimonHegele
Copy link

@Nifaste had it right, you can specify the desired python version when using pip.

Instead of:
pip install AlignQC
Try:
pip2.7 install AlignQC

(need python 2.7 obviously)

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