Skip to content

unable to import interface: ModuleNotFoundError: No module named 'interface' #43

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

Closed
budhiraja opened this issue Dec 23, 2020 · 2 comments
Labels

Comments

@budhiraja
Copy link

I installed python-interface package via pip: pip install python-interface with the following output:

Requirement already satisfied: python-interface in c:\users\amar budhiraja\.conda\envs\keras\lib\site-packages (1.6.0)
Requirement already satisfied: six in c:\users\amar budhiraja\.conda\envs\keras\lib\site-packages (from python-interface) (1.12.0)

I then try to call it using the following import statement: from interface import implements, Interface but it results in the following import error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'interface'

Can someone point me to what I might be missing? I did restart my terminal after the installation of the package.

@ssanderson
Copy link
Owner

@budhiraja that looks like the correct command for installation. It sounds to me like the environment you're installing to might not be the one that you're running. From the pip output in your first snippet, it looks like python-interface is being installed to a conda env in c:\users\amar budhiraja\.conda\envs\keras. Is it possible that the command that's failing is using a different python environment? You should be able to check what environment your script is in by printing sys.prefix or sys.executable.

@ssanderson
Copy link
Owner

Closing this as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants