0

Im trying to install django in my virtual environments but files always get install in the python main direction (im using python latest version (3.10) and pip (21.3.1) and visual studio code) too and also when iim trying to work with my new venv i have issues with imports django

enter image description here

Nevercome
  • 1
  • 1
  • 3
    You need to be more specific about your question. What is the error you get? – kalia Oct 29 '21 at 19:30
  • im not getting any error its just that django isn't installing where i want it to be install which is in my proyect files so that my proyect can catch it with some others packages – Nevercome Oct 29 '21 at 20:13
  • Are you sure that you enabled (activated) the correct virtual environment and installed the Django package inside it? It is the most common mistake to install packages system-wide (with default python&pip). – Deniz Kaplan Oct 29 '21 at 20:21
  • yes everytime i try to install it to install it in my selected venv it get install outside it https://i.imgur.com/x17WyEW.png – Nevercome Oct 29 '21 at 20:26
  • Please share the steps you're using to activate the virtualenv. There should be something that you're missing. We can offer specific solutions if you share as many details as you can. Like your os, the output of pip -V etc. – Deniz Kaplan Oct 29 '21 at 20:58
  • OS: Win10, i first write on VSC terminal by writing python -m venv c:/applications/newpythonproject/venv then procedee to activate it using 'pip install django' and then trying to install django with 'pip install django' but it doesn't install in the venv... https://i.imgur.com/Rhszn0O.png – Nevercome Oct 29 '21 at 21:10
  • I think you did it right, just vscode couldn't link your venv. Check the following answer to set it up correctly: https://stackoverflow.com/a/54107016/2474573 – Deniz Kaplan Oct 29 '21 at 21:22
  • Dammnn finally i found what was the issues it was deepter in my OS Config with the Set-ExecutionPolicy which it was restricted, so that make me unable to select the venv thanks! everything is installed and running as expected thanks! – Nevercome Oct 29 '21 at 23:16

0 Answers0