-1

hello friends i code django and python in pycharm for a company .i have 2 project in one of them i can see the source code of django and django rest framework with "command + mose over" and in another one it doesnt work with django and other libraries except my code and python source code. i mean i can see the source of os in "import os " but i cant see and go through the for example "from rest_framework import authentication".... the senior tell me maybe the place of the env file ....I do not know what to do? can anyone help me ? this is the location of my "venv" and "bime" is the name of the project place of env and project

when i want to see my code it is link to source and i can use command to go there like bellow image as you see it has "_" and it is active to move me to the code enter image description here but when i want to see the django and other package code it is not active to move me in the code like bellow enter image description here i know i can see the other package code in .venv/libe/site-package but i want straight way with less time

fahime
  • 5
  • 4
  • Could you clarify what your question is? Are you asking how to see the source code of libraries installed via `pip`? – BrokenBenchmark Jan 24 '22 at 08:20
  • 1
    Welcome to Stack Overflow. Please read [ask]. I am not sure I understand you, but it seems like you really have a question about how to use the computer (in order to find files), not a question about programming. Please try https://superuser.com instead. Or did you just want to know where the files are located? Do I understand correctly that `.venv` is the folder with the virtual environment? Then you should look in there - it will have a similar structure to the system Python. – Karl Knechtel Jan 24 '22 at 08:20
  • Check the configuration of your django. Some functions are just "grafted" (authentication is one of them: you select configuration time which authentication function do you use). PyCharm has no way yo know (also because you may have different settings for deployment, development, and fixtures). – Giacomo Catenazzi Jan 24 '22 at 08:29
  • i improve my question ...yes i want to see the code of package that install with pip @ BrokenBenchmark – fahime Jan 24 '22 at 08:32

1 Answers1

1

Make sure you have the correct Python Interpreter set, it should be set in Pycharm settings and should point to your virtual environment where you have these packages installed.

You can find out more about interpreters in Pycharm here https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html#add_new_project_interpreter

Paweł Mucha
  • 226
  • 2
  • 3
  • i do not know why when i use python3.8 in as interpreter the above problem solve and when i use 3.9 it does not link?(this project base 3.9) ... i had the 3.8 but now i add 3.9 with "which python3.9 "command ...i do not know what is wrong? – fahime Jan 25 '22 at 08:00