Having problem with Viewer #943
-
Hello FipyTeam, I am getting the following error while I was trying the examples on FiPy website. Uncaught exception:
Traceback (most recent call last):
File "~\test1.py", line 30, in <module>
viewer = Viewer(vars=phi,
File "C:\ProgramData\Anaconda3\lib\site-packages\fipy\viewers\__init__.py", line 105, in Viewer
for name, ep in sorted(enpts):
TypeError: '<' not supported between instances of 'EntryPoint' and 'EntryPoint' This was the example code I was working on. from fipy import Grid1D, ExplicitDiffusionTerm, TransientTerm, Viewer, CellVariable
nx = 50
dx = 1.
mesh = Grid1D(nx=nx, dx=dx)
phi = CellVariable(name="solution variable",
mesh=mesh,
value=0.)
D = 1.
valueLeft = 1
valueRight = 0
phi.constrain(valueRight, mesh.facesRight)
phi.constrain(valueLeft, mesh.facesLeft)
eqX = TransientTerm() == ExplicitDiffusionTerm(coeff=D)
if __name__ == '__main__':
viewer = Viewer(vars=phi,
datamin=0., datamax=1.)
viewer.plot() I have even tried installing on a new environment, but still was getting the same error. Can someone please help me solve this error? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 6 replies
-
If you run
Please show what these versions are for you. |
Beta Was this translation helpful? Give feedback.
-
Hello, I am getting the following error if I execute that command. error: Multiple top-level packages discovered in a flat-layout: ['terms', 'meshes', 'solvers', 'viewers', 'matrices', 'steppers', 'variables', 'boundaryConditions']. To avoid accidental inclusion of unwanted files or directories, If you are trying to create a single distribution with multiple packages
To find more information, look for "package discovery" on setuptools docs. And if create an empty folder and execute the command by going in that folder, I am getting these (attached file). |
Beta Was this translation helpful? Give feedback.
-
I've installed the same packages as you on a Windows machine and I still don't get an error. Out of curiosity, what does python -c "import setuptools; print(setuptools.__version__)" report? Regardless, I'll work on migrating from |
Beta Was this translation helpful? Give feedback.
-
Please try https://github.com/usnistgov/fipy/tree/migrate_pkg_resources2importlib |
Beta Was this translation helpful? Give feedback.
-
Thanks for bringing this to our attention. The fix has been merged to |
Beta Was this translation helpful? Give feedback.
Ah. That interface apparently wasn't introduced until Python 3.10. Please update and try again.