Metaclass conflict when importing discretize
See original GitHub issueWhat was done
- Using a new python 3.7.3 virtualenv, run
pip install discretize
- Start the python interpreter
- run
import discretize
What was seen
>>> import discretize
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/ianmacaulay/tmp/venv3/lib/python3.7/site-packages/discretize/__init__.py", line 2, in <module>
from discretize.TensorMesh import TensorMesh
File "/Users/ianmacaulay/tmp/venv3/lib/python3.7/site-packages/discretize/TensorMesh.py", line 15, in <module>
InnerProducts, TensorMeshIO
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
What was expected Discretize should import properly.
OS: MacOS 10.14.6 python: 3.7.3 Version: 0.4.9
The only version that I was able to get to work was 0.4.4 on a clean install, although I was required to install numpy myself before I could install discretize
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (10 by maintainers)
Top Results From Across the Web
Resolving metaclass conflicts - python - Stack Overflow
Heres your problem: The base class has a metaclass that is not the same type as the subclass. That is why you get...
Read more >metaclass conflict" when importing any class from boxsdk ...
Getting the following error when trying to import any class from boxsdk in Python TypeError: metaclass conflict: the metaclass of a derived ...
Read more >SOLVING THE METACLASS CONFLICT
The simplest case where a metatype conflict happens is the following. Consider a class A with metaclass M_A and a class B with...
Read more >SOLVING THE METACLASS CONFLICT « Python recipes «
This is done via the classmaker class factory, wich internally invokes the get_noconflict_metaclass function.
Read more >OMG Unified Modeling LanguageTM (OMG UML), Infrastructure
The UML metamodel imports and specializes all metaclasses in the ... This excludes hidden ones, i.e., those which have names that conflict with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@prisae 0.4.10 works fine for me now. Installing
matplotlib
in0.4.9
also fixed it. Thanks for getting this resolved so quicklyCan you do a
pip install scooby
and then in your Python environment aand post the output?