#πŸ”’ Python Virtual Environment issues

39 messages Β· Page 1 of 1 (latest)

jolly radishBOT
#

@limpid bolt

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

limpid bolt
#

Exception has occurred: ModuleNotFoundError
No module named 'requests'
File "C:\Users\jommy\Desktop\Python\Misc\test.py", line 1, in <module>
import requests
ModuleNotFoundError: No module named 'requests'

#

I installed this on the used interpeter

#

I would ask my friend that knows more about it but they broke their pc.

prime dawn
# limpid bolt

Click on "Create Virtual Environment" to create a virtual environment. After it is created, refresh your terminal in your VSCode and then type pip install requests

limpid bolt
#

I have almost all my scripts in my \Desktop\Python folder, should I make a folder in it called "venv"

#

should I do Use Existing or Delete and Recreate?

prime dawn
# limpid bolt

I guess you don't need to make a new one since you already have a .venv there

limpid bolt
#

I tried but it doesnt seem to work, also how would I use launch.json to make it auto use 1 venv for a certain script??

prime dawn
# limpid bolt

Then from here, click "Enter interpreter path" and select that .venv folder you already have

prime dawn
limpid bolt
#

thats what it looked like after i just selected that intepreter

prime dawn
# limpid bolt

ok and if you type pip install requests and hit enter?

limpid bolt
#

it installed, i do have aton of imports on it

prime dawn
limpid bolt
#

1 package seemed to need numpy on a newer version, then another script would need an older numpy version

prime dawn
#

Why the different numpy versions?

#

I would think both scripts should be able to support the same numpy version

limpid bolt
#

I guess some stuff isnt on the newer ver

#

Exception has occurred: ModuleNotFoundError
No module named 'pkg_resources'
File "C:\Users\jommy\Desktop\Python\Misc\test.py", line 9, in <module>
from win10toast import ToastNotifier
ModuleNotFoundError: No module named 'pkg_resources'

limpid bolt
#

Im just so confused on this sort of stuff.

prime dawn
#

Do you need that win10toast?

#

Last update is 2018

#

!pypi win10toast

jolly radishBOT
#

An easy-to-use Python library for displaying Windows 10 Toast Notifications

Released on <t:1516938002:D>.

prime dawn
limpid bolt
#

hmm... I'll see...

#

ima comment that line out

thick shuttle
#

Windows Store packaged Python is very strange to end users. Just don’t use that. Either download from Python.org or use uv/pyenv to manage your local Python versions.

limpid bolt
#

I originally used Python 3.13.2 from MS Store but installed from the website instead to try and fix the issues since it seems to have some odd permissions and stuff

#

im just trying to figure out Virtual Environments that way 1 script can use an older numpy and 1 script i have use a newer

#

I dont know anymore..

prime dawn
jolly radishBOT
#
Python help channel closed using Discord native close action

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.