Import ASE Module on python - python

After installing 'ase' (Atomic Simulation Module) module using pip in Python 3.7.3, Failed to import the module using python shell, although it is found in the pip list.
>>> import ase
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import ase
ModuleNotFoundError: No module named 'ase'

Related

Facing import builtins ImportError during installation of pgadmin4 in centos7?

Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/pgadmin4-web/setup.py", line 17, in import builtins ImportError: No module named builtins
Execute it with python3. IE:
python3 /usr/lib/python3.6/site-packages/pgadmin4-web/setup.py

ModuleNotFoundError: No module named 'pip.commands'

I am getting the following error:
Traceback (most recent call last):
File "setup.py", line 8, in <module>
from pip.commands import WheelCommand
ModuleNotFoundError: No module named 'pip.commands'
While I have python (screenshot attached)
Python 3.6.3 :: Anaconda, Inc.
pip 18.1
wheel 0.32.2
Any suggestion will be highly appreciable
There is a little problem with you import in setup.py file. you should write like this:
from pip._internal.commands import WheelCommand
it is because you can only import 1._vendor and 2._internal from pip.

Python + RaspberryPI can't import GPIO after installing: ImportError: No module named _GPIO

I have a RPi 2 (running raspbian jessie with pixel) and just tried to install the GPIO module:
I have downloaded and installed from source. Then I issue commands:
pi#raspberry:python
>>> import RPi.GPIO as GPIO
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "RPi/GPIO/__init__.py", line 23, in <module>
from RPi._GPIO import *
ImportError: No module named _GPIO
so then I tried using sudo:
pi#raspberry:sudo python
>>> import RPi.GPIO as GPIO
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "RPi/GPIO/__init__.py", line 23, in <module>
from RPi._GPIO import *
ImportError: No module named _GPIO
Then I removed the module from python, and installed it again using pip:
pi#raspberry:sudo pip install RPi.GPIO
pi#raspberry:sudo python
>>> import RPi.GPIO as GPIO
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "RPi/GPIO/__init__.py", line 23, in <module>
from RPi._GPIO import *
ImportError: No module named _GPIO
Then I removed the module from python, and installed it again using apt-get:
pi#raspberry:sudo apt-get update
pi#raspberry:sudo apt-get -y install python-rpi.gpio
pi#raspberry:sudo python
>>> import RPi.GPIO as GPIO
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "RPi/GPIO/__init__.py", line 23, in <module>
from RPi._GPIO import *
ImportError: No module named _GPIO
It seems it has nothing to do with the install method, so I'm assuming it's something to do with either Raspbian Jessie + pixel or the current version of python-gpio is broken/incompatible.
Its strange because I am not importing "_GPIO", I am importing "GPIO", which indicates to me that my python syntax is not the culprit.
Could somebody please recommend what I should try next?
Also I searched this exact error on Google and got 1 result which was not helpful.
Thanks,
i think you have a dir called RPi in your current dir,so change your python file to another dir which doesn't have ,it works for me...hope it's helpful :)

Can't find submodule in package

I'm using Anaconda3 version 4.2.0 on ubuntu (in docker).
Anaconda is installed in /root/anaconda3 folder.
I installed theano_bpr package using pip install theano_bpr.
Now when i open python and try import theano_bpr, i get the following message:
>>> import theano_bpr
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/root/anaconda3/lib/python3.5/site-packages/theano_bpr/__init__.py", line 17, in <module>
from bpr import BPR
ImportError: No module named 'bpr'
However, when i navigate to /root/anaconda3/lib/python3.5/site-packages/theano_bpr/ and run python there, i'm able to import theano_bpr.
In /root/anaconda3/lib/python3.5/site-packages/theano_bpr/ there are following files:
__init__.py, bpr.py (this one is causing problems), t.py, and utils.py.

matplotlib gives ImportError: No module named six

I am using python 2.7 with matplotlib 1.4.3. When I try to run a simple program I get this error:
Traceback (most recent call last):
File "C:\Python27\Projects\ImgRecg\img.py", line 3, in <module>
import matplotlib.pyplot
File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 105, in <module>
import six
ImportError: No module named six
You need to install the Six module.
pip install six

Categories

Resources