Can't import numpy, pandas, tensorflow, or pytorch

I've been running Pycharm community version 2018.3.4 on my old computer with windows 10

On my new computer with windows 11, I installed Anaconda (it came with Python 3.9), then installed tensorflow and Pytorch. Finally, I installed Pycharm community version 2022.2.2.

From from Jupyter notebooks or Spyder, I can import numpy, pandas, tensorflow, pytorch, or matplotlib, and they all work.

With PyCharm, I can't import any of them. From Files -> settings, I setup the path to Python.exe under Anaconda, so basic python works.

How do I get PyCharm to find these libraries?

Note: I've been running Pycharm community version 2018.3.4 on my old computer with windows 10, and all of these imports worked fine.

 

 

 

3 comments
Comment actions Permalink

Hello, 

Please attach a screenshot of the  Project Interpreter Settings 

Perhaps, you have installed the packages in a base conda interpreter, but in PyCharm you have created an isolated conda environment. You can install packages in IDE , please see https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html

0
Comment actions Permalink

I clicked on your second link and followed the directions to "configure a conda environment", and now the interpreter settings  has a long list of packages. And that took care of it so I can import everything.

Thank you.

0

Please sign in to leave a comment.