-1

Running on Windows 10, I have python 3.10.4 installed.

I am running my python app on virtualenv and whenever I am installing the package with pip it is not reflected in the import statement in the code however, it is shown by "pip list" command.

Also, Whenever I am using pycharm's python interpreter for installing the package it is reflected in the code. Can anyone help in this matter, I am stuck.

davidism
  • 121,510
  • 29
  • 395
  • 339
CheeSeE
  • 19
  • 2

1 Answers1

0

It seems like that you are installing the package with the system python environment or that you didn't configure the ide.

Try this go to your project folder open the Windows terminal

  • activate your evarioment .\your-env-name\Scripts\activate
  • check with where.exe pip if is present the pip.exe path in your 'env-name' evarioment
  • if is present you should have no problem installing with pip install in the terminal and executing python code from the terminal
  • if you want your ide to recognise your imports in the vitual envirioment you need to configure it

I point to two configuration guides one with pycharm and one with vscode

https://www.jetbrains.com/help/pycharm/creating-virtual-environment.html#existing-environment

https://code.visualstudio.com/docs/python/environments

Nimantha
  • 6,405
  • 6
  • 28
  • 69