Warum wird das Pandas-Modul nicht gefunden, obwohl es bereits installiert ist?Python

Python-Programme
Anonymous
 Warum wird das Pandas-Modul nicht gefunden, obwohl es bereits installiert ist?

Post by Anonymous »

Ich möchte einen Dummy-Code auf Python ausführen, um die Pandas-Bibliothek zu testen. Auch wenn das Pandas-Paket in der Pip-Liste der virtuellen Python-Umgebung vorhanden ist, wird immer noch der Fehler angezeigt, der besagt:

Code: Select all

"C:\Users\Youseng Taiheng\AppData\Local\Microsoft\WindowsApps\python3.13.exe" "c:/Users/Youseng Taiheng/OneDrive/Desktop/vscode/python/pandnew.py"
Traceback (most recent call last):
File "c:\Users\Youseng Taiheng\OneDrive\Desktop\vscode\python\pandnew.py", line 1, in 
import pandas as pd
ModuleNotFoundError: No module named 'pandas'
  • mein Python-Code

Code: Select all

import pandas as pd

df = pd.DataFrame([[1,2,3],[4,5,6],[7,8,9]], columns = ["A", "B","C"])

print(df)
  • Pip-Liste meines Venv (dort befindet sich die Pandas-Bibliothek)

    Code: Select all

    Package                 Version
    ----------------------- -----------
    asttokens               3.0.1
    colorama                0.4.6
    comm                    0.2.3
    debugpy                 1.8.19
    decorator               5.2.1
    executing               2.2.1
    ipykernel               7.1.0
    ipython                 9.9.0
    ipython_pygments_lexers 1.1.1
    jedi                    0.19.2
    jupyter_client          8.8.0
    jupyter_core            5.9.1
    matplotlib-inline       0.2.1
    nest-asyncio            1.6.0
    numpy                   2.4.1
    packaging               25.0
    pandas                  2.3.3
    parso                   0.8.5
    pip                     25.3
    platformdirs            4.5.1
    prompt_toolkit          3.0.52
    psutil                  7.2.1
    pure_eval               0.2.3
    Pygments                2.19.2
    python-dateutil         2.9.0.post0
    pytz                    2025.2
    pyzmq                   27.1.0
    six                     1.17.0
    stack-data              0.6.3
    tornado                 6.5.4
    traitlets               5.14.3
    tzdata                  2025.3
    wcwidth                 0.2.14
    
  • das Bild des Terminals und der Code zusammen im Visual Studio-Code: Geben Sie hier die Bildbeschreibung ein

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post