1

I have installed a package, django_celery_beat. I can import it in the shell:

>>import django_celery_beat
>> 

But Pycharm shows me an error, it underlines the import as if the package wasn't installed. Why could this be?

Alejandro Veintimilla
  • 10,743
  • 23
  • 91
  • 180

1 Answers1

2

PyCharm doesn't use bashrc, so it doesn't know where your library is. So, now

There are 2 options:

  • Either you should add your own paths for libraries in Interpreter Paths list in pycharm

OR

  • Install package using pycharm

Adding Path

  • Go into Settings -> Project Settings -> Project Interpreter.
  • Then press configure interpreter, and navigate to the "Paths" tab.
  • Press the + button in the Paths area. You can put the path to the module you'd like it to recognize

You can follow the link to add path in pycharm from here.

Community
  • 1
  • 1
Astik Anand
  • 12,757
  • 9
  • 41
  • 51