unable to import interface: ModuleNotFoundError: No module named 'interface' - python

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.

Related

Tensorflow - ModuleNotFoundError: No module named 'reverb'

When i run a python program, it shows the error message
sam#MSI:~/circuit-training$ python3 -m circuit_training.learning.ppo_reverb_server --root_dir=${ROOT_DIR} --port=${REVERB_PORT}
Traceback (most recent call last):
from circuit_training.learning import ppo_reverb_server_lib
File "/home/sam/circuit-training/circuit_training/learning/ppo_reverb_server_lib.py", line 20, in
import reverb
ModuleNotFoundError: No module named 'reverb'
To solve it, I install the packages by using pip install reverb, and it shows
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: reverb in /home/sam/.local/lib/python3.8/site-packages (2.0.1)
It seems like i already have this package, but when i import reverb, it still saying that ModuleNotFoundError: No module named 'reverb'
Is it because import cannot find the package path?

Unable to import praw

I tried pip installing: It worked but nothing else happened.
Requirement already satisfied: praw in c:\users\william\appdata\local\programs\python\python38\lib\site-packages (7.2.0)
Note: Im using visual studio code. But this still happens while using different IDEs, and python itself.
Here is my error:
Traceback (most recent call last):
File "c:\Users\William\Downloads\Rocket\main.py", line 7, in <module>
import praw
ModuleNotFoundError: No module named 'praw'```
Thanks.
Did you use pip install praw command to install it?

How to install module tf0to1 in python3.5 operating system windows 10

I am trying to upgrade vactorized_graph.py using below command which gives me an error
C:\Python35>python tf_upgrade.py --infile vectorized_graph.py --outfile
vectorized_graph_1.py
Traceback (most recent call last):
File "tf_upgrade.py", line 21, in <module>
from tf0to1.core import Tensorflow0To1Transformer
ImportError: No module named 'tf0to1'
and when I try to install module tf0to1, I get below error.
C:\Python35\Scripts>pip3 install tf0to1
Collecting tf0to1
Could not find a version that satisfies the requirement tf0to1 (from
versions: )
No matching distribution found for tf0to1
(I have already installed module redbaron)
Any suggestion?

Can't correctly import six module via pip when I was installing easy install

it has already claimed that I have either installed or upgraded six module
C:\Users\floatSD\Downloads\setuptools-34.3.1\setuptools-34.3.1>pip install --upgrade six
Requirement already up-to-date: six in c:\users\floatsd\anaconda3\lib\site-packages
but it shows error run the easy_install.py
C:\Users\floatSD\Downloads\setuptools-34.3.1\setuptools-34.3.1>python easy_install.py
and it returns:
Traceback (most recent call last):
File "easy_install.py", line 4, in <module>
from setuptools.command.easy_install import main
File "C:\Users\floatSD\Downloads\setuptools-34.3.1\setuptools-34.3.1\setuptools\__init__.py", line 10, in <module>
from six.moves import filter, map
ImportError: No module named six.moves
p.s. my pip version is 9.0.1
I tried uninstall and install six again, but still doesn't work
C:\Users\floatSD\Downloads\setuptools-34.3.1\setuptools-34.3.1>pip uninstall six
DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling six-1.10.0:
c:\users\floatsd\anaconda3\lib\site-packages\six-1.10.0-py3.5.egg-info
Proceed (y/n)? y
Successfully uninstalled six-1.10.0
C:\Users\floatSD\Downloads\setuptools-34.3.1\setuptools-34.3.1>pip install six
Collecting six
Downloading six-1.10.0-py2.py3-none-any.whl
Installing collected packages: six
Successfully installed six-1.10.0
C:\Users\floatSD\Downloads\setuptools-34.3.1\setuptools-34.3.1>python easy_install.py
Traceback (most recent call last):
File "easy_install.py", line 4, in <module>
from setuptools.command.easy_install import main
File "C:\Users\floatSD\Downloads\setuptools-34.3.1\setuptools-34.3.1\setuptools\__init__.py", line 10, in <module>
from six.moves import filter, map
ImportError: No module named six.moves

Import error in pyPDF2 when it is correctly installed

I am using python 2.7.6 on Ubuntu 14.04 LTS. When I run this command:
sudo pip install pypdf2
The following message shows up:
Requirement already satisfied (use --upgrade to upgrade):
pypdf2 in /usr/local/lib/python2.7/dist-packages
Cleaning up...
This means that pypdf2 is already installed on my system but when I try to import pyPDF2, this message comes up:
>>> import pyPDF2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pyPDF2
Capitalization counts. Try import PyPDF2 and see if that works.

Categories