NumPy issue in PyCharm

Answered

Good afternoon, 

 

I have a question about using PyCharm.

I use Anaconda3-2018.12-Windows-x86_64, and  pycharm-professional-2018.3.2.

When I run my code, I got this: 

 

"Missing required dependencies {0}".format(missing_dependencies))

ImportError: Missing required dependencies ['numpy'] "

 

Could I ask you that what is the problem? And how to solve it?

Thank you very much. 

5 comments
Comment actions Permalink

Hi,

Please try running it from command line (outside of PyCharm) using the same interpreter. Do you have the same error?

0
Comment actions Permalink

Good Afternoon Karpov,

 

Thank you very much for replying. 

 

No, I do not this error when I command line

I do not have this error when I use spyder or jupyter notebook either

 

It is an error of pycharm ONLY. 

0
Comment actions Permalink

Does it happen with any script or just this one?

Please provide the whole console output and a screenshot of your Project Interpreter (Preferences | Project | Project Interpreter).

0
Comment actions Permalink

Hi,

I have also facing the same issue, it does work in terminal but not in PyCharm IDE.

 

//Thanks

0
Comment actions Permalink

The first thing that we need to ensure is that your script is executed in correct conda environment.

Please try to create a new project with a new conda interpreter. After the project is created, ensure the new conda interpreter was also created by running in the terminal `conda env list`

Then run the script in this project - will it produce the same error?

Another thing to try - activate the required conda environment in your terminal with `conda activate <env_name>`, and then run PyCharm from the same terminal session using `bin/pycharm.sh`

0

Please sign in to leave a comment.