-1

after using the command:

pip install pandas

this is the message I got:

Requirement already satisfied: pandas in c:\users\pathu\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages (1.3.4)
Requirement already satisfied: pytz>=2017.3 in c:\users\pathu\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages (from pandas) (2021.3)
Requirement already satisfied: python-dateutil>=2.7.3 in c:\users\pathu\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages (from pandas) (2.8.2)
Requirement already satisfied: numpy>=1.17.3 in c:\users\pathu\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages (from pandas) (1.21.4)
Requirement already satisfied: six>=1.5 in c:\users\pathu\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages (from python-dateutil>=2.7.3->pandas) (1.16.0)

but after running the code in shell

>>> import pandas as pd

this is the error I got:

Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    import pandas as pd
ModuleNotFoundError: No module named 'pandas'
Tranbi
  • 11,407
  • 6
  • 16
  • 33
MadNit
  • 13
  • 2

1 Answers1

1

Could you try creating a virtual environment(pip install virtualenv), activating it(path\to\venv\Scripts\activate.bat), and then working with pandas?

JohnWick
  • 63
  • 2
  • 8
  • I got a warning : The script virtualenv.exe is installed in 'C:\Users\pathu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. – MadNit Nov 21 '21 at 13:02
  • why not do as the warning says and add that directory to the PATH variable? – Riley Nov 21 '21 at 14:00