pandas尝试在 VS Code 中导入
import pandas
Run Code Online (Sandbox Code Playgroud)
并得到了
Traceback (most recent call last):
File "c:\Users\xxxx\hello\sqltest.py", line 2, in <module>
import pandas
ModuleNotFoundError: No module named 'pandas'
Run Code Online (Sandbox Code Playgroud)
pandas尝试安装
pip install pandas
pip3 install pandas
python -m pip install pandas
Run Code Online (Sandbox Code Playgroud)
分别返回的
(.venv) PS C:\Users\xxxx\hello> pip3 install pandas
Requirement already satisfied: pandas in c:\users\xxxx\hello\.venv\lib\site-packages (1.1.0)
Requirement already satisfied: pytz>=2017.2 in c:\users\xxxx\hello\.venv\lib\site-packages (from pandas) (2020.1)
Requirement already satisfied: numpy>=1.15.4 in c:\users\xxxx\hello\.venv\lib\site-packages (from pandas) (1.19.1)
Requirement already satisfied: python-dateutil>=2.7.3 in c:\users\xxxx\hello\.venv\lib\site-packages (from pandas) (2.8.1) …Run Code Online (Sandbox Code Playgroud)