0

Previously I have been experimenting with pyenv and a few hours ago i wanted to fully uninstall and remove it from my computer. After doing so everything in python stopped working. Including VScode. So I uninstalled everything and re-installed both python and VScode. That did fix most of the problem but, after trying to get back into a project that i was working on. I have discovered that import has stopped working. I can only import from the same directory of the running python file, and nothing else would work.

I am sure that i have successfully installed the modules using

pip install <package_name>

after doing do so the import still has yellow underlining and it says "Could not be resolved from source"

Screen shot of what it looks like

after checking the module is installed, i think it is installed under the path

c:\users\name\appdata\local\programs\python\python311\lib\site-packages

I'm not sure if this is the correct path or how to fix this. THis is my first time running into this issue, and I have been trying to fix this problem for the past 2-3 hours. In that time I have also tried multiple attempts of uninstalling and re-installing.

Nothing has worked so far. How would i fix this.

  • you are probably installing to the wrong python. To be sure, do this: `python -m pip install ` – D.L Jul 28 '23 at 16:03
  • also see this related issue: https://stackoverflow.com/questions/75354886/copying-modules-from-python-3-10-to-3-11-does-not-work – D.L Jul 28 '23 at 16:05
  • I have tried that before but it still doesn't work. It shows up with requirements already satisfied with the path that I gave above. I made sure that I removed the packages completely and reinstalled everything. It still says this. – Dr Technology Jul 30 '23 at 01:22
  • `C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\site-packages` This is the path that apparently import is trying to look for the packages but instead, the pip install is installing packages in the path above. – Dr Technology Jul 30 '23 at 01:24
  • make sure that you have added python to path in the windows system. – D.L Jul 31 '23 at 06:36

0 Answers0