Hello, I tried to import all of these libraries but I couldn’t. The error shows as below, Does anyone know how to fix this error.
My python version is Python 3.11.9
import dolfinx
import numpy as np
import pandas as pd
import dolfinx.nls.petsc
import ufl
import dolfinx.fem.petsc
import pyvista
import matplotlib.pyplot as plt
from dolfinx.mesh import CellType, create_rectangle
from mpi4py import MPI
from dolfinx import fem, nls, io, default_scalar_type
from ufl import Measure, inner, grad, div, TestFunction, TrialFunction, adjoint, derivative, SpatialCoordinate, TestFunction, TrialFunction, dot, ds, dx
from dolfinx.fem import (Constant, Function, FunctionSpace,
assemble_scalar, dirichletbc, form, locate_dofs_geometrical)
from petsc4py import PETSc
from dolfinx.plot import vtk_mesh
import pyvista as pv
import time
import math
import seaborn as sns
import tensorflow as tf
from sklearn.model_selection import train_test_split
from tensorflow.keras.layers import Dense
from tensorflow.keras.models import Sequential
from sklearn.preprocessing import LabelEncoder
import ast
import tensorflow as tf
from sklearn.model_selection import train_test_split
import pandas as pd
import gc
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[13], line 21
18 import time
19 import math
---> 21 import seaborn as sns
22 import tensorflow as tf
23 from sklearn.model_selection import train_test_split
File /usr/local/lib/python3.10/dist-packages/seaborn/__init__.py:5
3 from .utils import * # noqa: F401,F403
4 from .palettes import * # noqa: F401,F403
----> 5 from .relational import * # noqa: F401,F403
6 from .regression import * # noqa: F401,F403
7 from .categorical import * # noqa: F401,F403
File /usr/local/lib/python3.10/dist-packages/seaborn/relational.py:21
13 from .utils import (
14 adjust_legend_subtitles,
15 _default_color,
(...)
18 _scatter_legend_artist,
19 )
20 from ._compat import groupby_apply_include_groups
---> 21 from ._statistics import EstimateAggregator, WeightedAggregator
22 from .axisgrid import FacetGrid, _facet_docs
23 from ._docstrings import DocstringComponents, _core_docs
File /usr/local/lib/python3.10/dist-packages/seaborn/_statistics.py:32
30 import pandas as pd
31 try:
---> 32 from scipy.stats import gaussian_kde
33 _no_scipy = False
34 except ImportError:
File /usr/local/lib/python3.10/dist-packages/scipy/stats/__init__.py:608
1 """
2 .. _statsrefmanual:
3
(...)
603
604 """
606 from ._warnings_errors import (ConstantInputWarning, NearConstantInputWarning,
607 DegenerateDataWarning, FitError)
--> 608 from ._stats_py import *
609 from ._variation import variation
610 from .distributions import *
File /usr/local/lib/python3.10/dist-packages/scipy/stats/_stats_py.py:37
35 from numpy import array, asarray, ma
36 from numpy.lib import NumpyVersion
---> 37 from numpy.testing import suppress_warnings
39 from scipy.spatial.distance import cdist
40 from scipy.ndimage import _measurements
File /usr/local/lib/python3.10/dist-packages/numpy/testing/__init__.py:17
12 from ._private import extbuild, decorators as dec
13 from ._private.nosetester import (
14 run_module_suite, NoseTester as Tester
15 )
---> 17 __all__ = _private.utils.__all__ + ['TestCase', 'run_module_suite']
19 from numpy._pytesttester import PytestTester
20 test = PytestTester(__name__)
NameError: name '_private' is not defined