其他分享
首页 > 其他分享> > pycharm如何安装openpyxl?

pycharm如何安装openpyxl?

作者:互联网

pycharm如何安装openpyxl?
(1)File-->Settings...-->Project:xxx  -->Python Interpreter-->点击右边齿轮图标-->Show All-->打开的窗口里面看到python.exe所在的位置:PycharmProjects\pythonProject\venv\Scripts\python.exe
(2)打开cmd.exe,进入python.exe的目录下C:\Users\SET-01421\PycharmProjects\pythonProject\venv\Scripts。
(3)
error_01:
WARNING: You are using pip version 20.3.3; however, version 21.0.1 is available.
You should consider upgrading via the 'c:\users\set-01421\pycharmprojects\pythonproject\venv\scripts\python.exe -m pip install --upgrade pip' command.

error_02:
C:\Users\SET-01421\PycharmProjects\pythonProject\venv\Scripts>python.exe -m pip install --upgrade pip
Requirement already satisfied: pip in c:\users\set-01421\pycharmprojects\pythonproject\venv\lib\site-packages (20.3.3)
Collecting pip
  Downloading pip-21.0.1-py3-none-any.whl (1.5 MB)
     |▌                               | 20 kB 1.9 kB/s eta 0:13:41ERROR: Exception:

    [1]先找到路径:C:\Users\SET-01421\PycharmProjects\pythonProject\venv\Scripts和C:\Users\SET-01421\PycharmProjects\pythonProject\venv\Lib\site-packages都在C:\Users\SET-01421\PycharmProjects\pythonProject\venv\下面
    [2]执行命令,第一个命令解决error_02,第二个命令解决error_01,要加--timeout=1200,否则会提示超时:
    pip3 install --target=C:\Users\SET-01421\PycharmProjects\pythonProject\venv\Lib\site-packages openpyxl -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com    --timeout=1200
    python -m pip install --upgrade pip   --timeout=1200
    pip install openpyxl   --timeout=1200
(4]File-->Settings...-->Project:xxx  -->Project Structure -->右边的:+Add Content Root 找到:C:\Users\SET-01421\PycharmProjects\pythonProject\venv\Lib\site-packages -->点击OK
 

标签:venv,pythonProject,openpyxl,--,01421,PycharmProjects,pip,pycharm,安装
来源: https://blog.csdn.net/ghomeway/article/details/113834953