I am getting the same error when trying to run any code on the pycharm. I installed sklearn from cmd(ran as admin). Not sure what is causing the problem. I was hoping to get some help here since i couldn't find anything on the google too. This is the error i have been getting:
Traceback (most recent call last):
File "C:\Users\HP\.conda\envs\pythonProject\lib\code.py", line 90, in runcode
exec(code, self.locals)
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm 2022.2.1\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2022.2.1\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/HP/PycharmProjects/pythonProject/Data Analytics 1/LAB/Lab1/Lab1.py", line 2, in <module>
import seaborn as sns
File "C:\Program Files\JetBrains\PyCharm 2022.2.1\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\HP\AppData\Roaming\Python\Python39\site-packages\seaborn\__init__.py", line 2, in <module>
from .rcmod import * # noqa: F401,F403
File "C:\Program Files\JetBrains\PyCharm 2022.2.1\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\HP\AppData\Roaming\Python\Python39\site-packages\seaborn\rcmod.py", line 5, in <module>
import matplotlib as mpl
File "C:\Program Files\JetBrains\PyCharm 2022.2.1\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\HP\AppData\Roaming\Python\Python39\site-packages\matplotlib\__init__.py", line 109, in <module>
from . import _api, _version, cbook, docstring, rcsetup
File "C:\Program Files\JetBrains\PyCharm 2022.2.1\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\HP\AppData\Roaming\Python\Python39\site-packages\matplotlib\rcsetup.py", line 27, in <module>
from matplotlib.colors import Colormap, is_color_like
File "C:\Program Files\JetBrains\PyCharm 2022.2.1\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\HP\AppData\Roaming\Python\Python39\site-packages\matplotlib\colors.py", line 56, in <module>
from matplotlib import _api, cbook, scale
File "C:\Program Files\JetBrains\PyCharm 2022.2.1\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\HP\AppData\Roaming\Python\Python39\site-packages\matplotlib\scale.py", line 19, in <module>
from numpy import ma
ImportError: cannot import name 'ma' from 'numpy' (unknown location)