python 解决 Windows import pandas as pd ModuleNotFoundError: No module named ‘pandas‘

I rarely use Python. A recent automated task of modifying an Excel table required the use of Python, but an error occurred when executing a command:

Windows import pandas as pd ModuleNotFoundError: No module named 'pandas'

Finally, after researching for a long time, after installing Python and configuring environment variables, we also need to install pandas such a tool;

step:

1. If you don’t have pip, install the pip tool with the command:

Enter (1) python -m ensurepip, (2) pyhon -m pip install –upgrade pip

2. After the installation is successful, check whether the installation is completed. Command:

Enter python -m pip list 

3. Install pandas, command:

Type pip install pandas

If you cannot install it due to network problems, you can try the command:

pip install pandas -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

After everything is installed, you can have fun playing again.

Guess you like

Origin blog.csdn.net/msn465780/article/details/135046181