import in python venv
Verfasst: Mittwoch 12. April 2023, 14:24
Hallo, ich bin relativ neu im thema python, ich wollte heute mal eine Bibliothek importieren, aber ich bekomme es nicht hin. also, was ich gemacht habe:
1. einen neuen Projekt Ordner erstellt.
2. eine neue Python installation gemacht mit: python -m venv pfad/zum/ordner
3. mit . fad/zum/ordner/bin/activate aktiviert
4. mit pip install discord.py ein Programm installiert (mir ist da schon aufgefallen, dass er ./lib/python3.10/site-packages als pfad anzeigt, gehört das so?)
5. mit import discord importiert
6. mit VS code ausgeführt
er zeigt mir aber diesen Fehler:
Traceback (most recent call last):
File "/pfad/zur/datei/bot.py", line 3, in <module>
import discord
ModuleNotFoundError: No module named 'discord'
warum ist das so?
1. einen neuen Projekt Ordner erstellt.
2. eine neue Python installation gemacht mit: python -m venv pfad/zum/ordner
3. mit . fad/zum/ordner/bin/activate aktiviert
4. mit pip install discord.py ein Programm installiert (mir ist da schon aufgefallen, dass er ./lib/python3.10/site-packages als pfad anzeigt, gehört das so?)
5. mit import discord importiert
6. mit VS code ausgeführt
er zeigt mir aber diesen Fehler:
Traceback (most recent call last):
File "/pfad/zur/datei/bot.py", line 3, in <module>
import discord
ModuleNotFoundError: No module named 'discord'
warum ist das so?