Code Ninja
Code Ninja

Reputation: 163

ModuleNotFoundError: No module named 'pandas' (in visual studio)

when i do pip show pandas i can see the version 1.4.3 is installed.

Name: pandas Version: 1.4.3 Summary: Powerful data structures for data analysis, time series, and statistics Home-page: https://pandas.pydata.org Author: The Pandas Development Team Author-email: [email protected] License: BSD-3-Clause Location: /Users/james/opt/anaconda3/lib/python3.9/site-packages Requires: pytz, python-dateutil, numpy Required-by: xarray, statsmodels, seaborn, hvplot, holoviews, datashader

however, when I run my code it can't find the module

Traceback (most recent call last): File "/Users/james/Desktop/web scraping tutorial/tutorial-one", line 1, in <module> import pandas as pd ModuleNotFoundError: No module named 'pandas'

it works on Anaconda but it won't work when i run it on visual studio

Upvotes: 0

Views: 227

Answers (1)

nferreira78
nferreira78

Reputation: 1164

You have to select the correct python interpreter (or configure the right environment) as documented here:

https://code.visualstudio.com/docs/python/environments#_work-with-python-interpreters

Upvotes: 1

Related Questions