periodic
periodic copied to clipboard
ImportError: No module named 'mass'
If I want to import periodic with import periodic
, I get an error:
Traceback (most recent call last):
File "/home/marting/PycharmProjects/simple/3d_test.py", line 4, in <module>
import periodic
File "/usr/local/lib/python3.4/dist-packages/periodic/__init__.py", line 1, in <module>
import mass
ImportError: No module named 'mass'
I installed periodic with sudo pip3 install periodic
.
This bug will be fixed by pull request #2.
The distribution on https://pypi.python.org/pypi/periodic still has the import problem:
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 12:04:33)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from periodic import element
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/yjj/anaconda3/lib/python3.6/site-packages/periodic/__init__.py", line 1, in <module>
import mass
ModuleNotFoundError: No module named 'mass'
I am also seeing this problem, is there a fix that could be worked on ? Thanks
Yes, was there an answer for this specific issue?
Still same problem
In case more people run into this problem and just want a quick fix for themselves, I recommend the following:
Go to /usr/lib/python3.8/site-packages/periodic
(or wherever the package manager put your python and periodic installation) and edit the __init__.py
to reflect the changes made in the following pull request:
https://github.com/luisnaranjo733/periodic/pull/2/commits/29b131da1f46dd642cae74a4a2731089412196df
Error: File "/Users//anaconda3/lib/python3.6/site-packages/periodic/init.py", line 1, in
open this path using pico and vim editor and update the two lines in the file to below two lines
from . import mass from .table import *
IT worked for me.
Facing the same problem
found the issue... its with the imports in init.py in the package. Made changes to the init.py in stored or installed package by adding .(dot) before importing and it worked.
new init.py ==>
from . import mass from .table import *
I pushed the updated code to pypi as periodic2023 https://pypi.org/project/periodic2023/