pip install --user --upgrade tensorflow-gpu安装错误

如何解决pip install --user --upgrade tensorflow-gpu安装错误

在命令解释器错误下方,

(base) C:\Users\ImdaduL Haque> pip install --user --upgrade tensorflow-gpu
WARNING: Retrying (Retry(total=4,connect=None,read=None,redirect=None,status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org',port=443): Read timed out. (read timeout=15)")': /simple/tensorflow-gpu/
Collecting tensorflow-gpu
  Downloading tensorflow_gpu-2.3.0-cp37-cp37m-win_amd64.whl (344.1 MB)
     |██▌                             | 28.1 MB 198 kB/s eta 0:26:33ERROR: Exception:
Traceback (most recent call last):
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py",line 437,in _error_catcher
    yield
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py",line 519,in read
    data = self._fp.read(amt) if not fp_closed else b""
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py",line 62,in read
    data = self.__fp.read(amt)
  File "c:\users\imdadul haque\anaconda3\lib\http\client.py",line 447,in read
    n = self.readinto(b)
  File "c:\users\imdadul haque\anaconda3\lib\http\client.py",line 491,in readinto
    n = self.fp.readinto(b)
  File "c:\users\imdadul haque\anaconda3\lib\socket.py",line 589,in readinto
    return self._sock.recv_into(b)
  File "c:\users\imdadul haque\anaconda3\lib\ssl.py",line 1052,in recv_into
    return self.read(nbytes,buffer)
  File "c:\users\imdadul haque\anaconda3\lib\ssl.py",line 911,in read
    return self._sslobj.read(len,buffer)
socket.timeout: The read operation timed out

During handling of the above exception,another exception occurred:

Traceback (most recent call last):
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\cli\base_command.py",line 216,in _main
    status = self.run(options,args)
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\cli\req_command.py",line 182,in wrapper
    return func(self,options,args)
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\commands\install.py",line 325,in run
    reqs,check_supported_wheels=not options.target_dir
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\resolution\legacy\resolver.py",line 183,in resolve
    discovered_reqs.extend(self._resolve_one(requirement_set,req))
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\resolution\legacy\resolver.py",line 388,in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\resolution\legacy\resolver.py",line 340,in _get_abstract_dist_for
    abstract_dist = self.preparer.prepare_linked_requirement(req)
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py",line 469,in prepare_linked_requirement
    hashes=self._get_linked_req_hashes(req)
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py",line 259,in unpack_url
    hashes=hashes,File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py",line 130,in get_http_url
    link,downloader,temp_dir.path,hashes
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py",line 282,in _download_http_url
    for chunk in download.chunks:
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\cli\progress_bars.py",line 168,in iter
    for x in it:
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\network\utils.py",line 88,in response_chunks
    decode_content=False,File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py",line 576,in stream
    data = self.read(amt=amt,decode_content=decode_content)
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py",line 541,in read
    raise IncompleteRead(self._fp_bytes_read,self.length_remaining)
  File "c:\users\imdadul haque\anaconda3\lib\contextlib.py",in __exit__
    self.gen.throw(type,value,traceback)
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py",line 442,in _error_catcher
    raise ReadTimeoutError(self._pool,None,"Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org',port=443): Read timed out.

(base) C:\Users\ImdaduL Haque>

运行命令 pip install --user --upgrade tensorflow-gpu 后,它显示上述错误,但我没有解决此问题。 注意:我不为低版本的tensorflow运行keras,这就是为什么我在通用状态下使用这些功能,但显示了错误。在我的上一个问题链接下面,我在其中说过tensorflow版本的问题。

tensorflow version's issue link

解决方法

发生这种情况是由于您的互联网连接薄弱。使用相同的命令再试一次。或者,您可以使用以下命令来增加等待时间:

pip --default-timeout=100 install --user --upgrade tensorflow-gpu
,

从2.0版开始没有tensorflow的gpu或cpu特定版本。如果仅使用pip install tensorflow,则将同时安装cpu和gpu版本。我要为cpu或gpu安装,您只能为tensorflow v1.x安装它们。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 <select id="xxx"> SELECT di.id, di.name, di.work_type, di.updated... <where> <if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 <property name="dynamic.classpath" value="tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams['font.sans-serif'] = ['SimHei'] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -> systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping("/hires") public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate<String
使用vite构建项目报错 C:\Users\ychen\work>npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-