python之 pyCharm pip安装pandas库失败 |
您所在的位置:网站首页 › pycharm导入pandas库报错 › python之 pyCharm pip安装pandas库失败 |
目录 安装报错重现:我在终端执行以下命令时,安装pandas报错失败, pip3 install pandas报错超时: socket.timeout: The read operation timed out pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.解决尝试pip3 -—default-time=100 install pandas失败 在终端执行以下命令时,安装pandas报错失败, pip3 -—default-time=100 install pandas好吧,没有什么用……换种方法, 尝试pip -—default-time=100 install pandas失败(2)尝试另外一种方法: 在终端执行以下命令时,安装pandas报错失败, pip --default-timeout=1000 install pandas好吧,没有什么用…… 尝试清华源安装 成功!报错: socket.timeout: The read operation timed out原因是pip下载的时国外的资源,速度过慢,应该切换至国内镜像。 (1)打开settings,找到project下的“Python Interpreter”, 打开之后,点击“+”号, (2)点击“+”号之后,1.如果下方有Manage Repositories, 直接点击下方的“Manage Repositories”进入,点击+号,在弹出的输入框内输入清华源地址 https://pypi.tuna.tsinghua.edu.cn/simple 点击OK按钮,并选中原来的源地址,点击-号删除,最后点击OK按钮。2.如果下方没有Manage Repositories(可能是pyCharm是最新版本的原因吧?) 请从这儿开始往下看: 没事,我们直接在打开“Tools–>Settings Repository–>+号–>输入清华源–>OK”,添加清华源, https://pypi.tuna.tsinghua.edu.cn/simple(3) 添加之后,我们重新通过“Python Interpreter”来安装第三方库pandas, (4)发现安装成功了, 而且在代码中导入pandas库也没有报错了, OK,问题解决!!! |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |