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

Import importlib.util #3

Merged
merged 2 commits into from
Jul 24, 2019
Merged

Conversation

Hiroshiba
Copy link
Contributor

I cannot import nanopq.

$ python -c "import nanopq"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/my/python3.6/site-packages/nanopq/__init__.py", line 6, in <module>
    from .convert_faiss import nanopq_to_faiss, faiss_to_nanopq
  File "/my/python3.6/site-packages/nanopq/convert_faiss.py", line 3, in <module>
    spec = importlib.util.find_spec("faiss")
AttributeError: module 'importlib' has no attribute 'util'

It looks like this.

python -c "import importlib; importlib.util"  # error
#
python -c "import importlib.util; importlib.util"  # no error

Your project's CI uses pytest, and pytest contains meny import importlib.util.
https://github.com/pytest-dev/pytest/search?q=importlib&unscoped_q=importlib
So, maybe an error does not occur at CI test.

@matsui528 matsui528 merged commit 75707bd into matsui528:master Jul 24, 2019
@matsui528
Copy link
Owner

@Hiroshiba Thanks! I updated the package on pypi as well. Now you can pip install the latest version and it should work well 👍

@Hiroshiba Hiroshiba deleted the import-importlib.util branch July 25, 2019 08:34
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

Successfully merging this pull request may close these issues.

2 participants