0

I am trying to run a django project in pycharm on Ubuntu 20. I have a virtual environment set up in pycharm as so enter image description here

I have clicked on the link saying install package tools. Pycharm just seems to load something but it doesn't let me add any package still. When I click on edit configuration, it tells me Error: Django is not importable in this environment. Going back to the python interpreter page as shown in the image, I see that I cannot even click on the add button to add packages. I have a requirements folder with base.txt, local.txt and production.txt inside of it. I only have ONE interpreter available as well. I am not sure on how to proceed.

faizanm17
  • 9
  • 2
  • Just follow the link pycharm is suggesting. You should have pip and setuptools in an empty project. – Yoshikage Kira May 28 '21 at 00:38
  • @Goion I have tried that, I still cannot add any packages – faizanm17 May 28 '21 at 00:53
  • Does this answer your question? [Pycharm - Python packaging tools not found](https://stackoverflow.com/questions/43567996/pycharm-python-packaging-tools-not-found) – Yoshikage Kira May 28 '21 at 01:05
  • Does this answer your question? [Pycharm error Django is not importable in this environment](https://stackoverflow.com/questions/27363661/pycharm-error-django-is-not-importable-in-this-environment) – rzlvmp May 28 '21 at 01:07
  • @Goion I have looked at that.. I have pip installed. Still same message. – faizanm17 May 28 '21 at 02:02
  • @rzlvmp In order to install Django, I need to be able to click the plus icon in the Python interpreter, so I need to figure that out first. – faizanm17 May 28 '21 at 02:04
  • Delete that venv and create a new one. Either create the new venv from inside the IDE or create a new venv using the command line. But after it's created it must have setuptools already installed when you open the interpreter. In any case, carefully follow those linked threads and one of them will work for you. – bad_coder May 28 '21 at 05:14

0 Answers0