pytorch PIP 和 CONDA 错误?

pytorch PIP and CONDA error?

伙计们,我是 python 和深度学习世界的新手

我尝试使用 conda 安装 pytorch

我收到这个错误...

(base) C:\WINDOWS\system32>conda install pytorch

`Solving environment: failed

PackagesNotFoundError:当前渠道不提供以下软件包:

当前频道:

尝试使用 Pip 安装 Pytorch 在出现此错误后它只是打开 pytorch 站点:

(base) C:\WINDOWS\system32>pip install pytorch Collecting pytorch Using cached pytorch-0.1.2.tar.gz Building wheels for collected packages: pytorch Running setup.py bdist_wheel for pytorch ... error Complete output from command C:\ProgramData\Anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\micha\AppData\Local\Temp\pip-build-t86penrg\pytorch\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d C:\Users\micha\AppData\Local\Temp\tmpqmo4j08upip-wheel- --python-tag cp36: Traceback (most recent call last): File "", line 1, in File "C:\Users\micha\AppData\Local\Temp\pip-build-t86penrg\pytorch\setup.py", line 17, in raise Exception(message) Exception: You should install pytorch from http://pytorch.org


pytorch 构建轮失败 运行 setup.py pytorch 清理 无法构建 pytorch 安装收集的包:pytorch 运行 setup.py 安装 pytorch ... 错误 命令 C:\ProgramData\Anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\micha\AppData\Local\Temp\pip-build-t86penrg\pytorch\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\micha\AppData\Local\Temp\pip-vms7q49e-record\install-record.txt --single-version-externally-managed --compile 的完整输出: 追溯(最近一次通话): 文件“”,第 1 行,位于 文件 "C:\Users\micha\AppData\Local\Temp\pip-build-t86penrg\pytorch\setup.py",第 13 行,位于 引发异常(消息) 例外:您应该从 http://pytorch.org

安装 pytorch
----------------------------------------

异常: 追溯(最近一次通话): 文件 "C:\ProgramData\Anaconda3\lib\site-packages\pip\commands\install.py",第 342 行,在 运行 中 前缀=options.prefix_path, 安装中的文件 "C:\ProgramData\Anaconda3\lib\site-packages\pip\req\req_set.py",第 784 行 **kwargs 安装中的文件 "C:\ProgramData\Anaconda3\lib\site-packages\pip\req\req_install.py",第 878 行 微调器=微调器, 文件 "C:\ProgramData\Anaconda3\lib\site-packages\pip\utils__init__.py",第 707 行,在 call_subprocess 中 % (command_desc, proc.returncode, cwd)) pip.exceptions.InstallationError: 命令“C:\ProgramData\Anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\micha\AppData\Local\Temp\pip-build-t86penrg\pytorch\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\micha\AppData\Local\Temp\pip-vms7q49e-record\install-record.txt --single-version-externally-managed --编译”失败,错误代码为 C:\Users\micha\AppData\Local\Temp\pip-build-t86penrg\pytorch\

在处理上述异常的过程中,又发生了一个异常:

回溯(最后一次调用): 主文件中的文件 "C:\ProgramData\Anaconda3\lib\site-packages\pip\basecommand.py",第 215 行 状态 = self.run(选项,参数) 文件 "C:\ProgramData\Anaconda3\lib\site-packages\pip\commands\install.py",第 385 行,在 运行 中 requirement_set.cleanup_files() 文件 "C:\ProgramData\Anaconda3\lib\site-packages\pip\req\req_set.py",第 729 行,在 cleanup_files 中 req.remove_temporary_source() 文件 "C:\ProgramData\Anaconda3\lib\site-packages\pip\req\req_install.py",第 977 行,在 remove_temporary_source 中 rmtree(self.source_dir) 文件 "C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\retrying.py",第 49 行,在 wrapped_f 中 return 重试(*dargs, **dkw).call(f, *args, **kw) 文件 "C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\retrying.py",第 212 行,调用中 提高 attempt.get() 文件 "C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\retrying.py",第 247 行,在 get 中 six.reraise(self.value[0], self.value[1], self.value[2]) 文件 "C:\ProgramData\Anaconda3\lib\site-packages\six.py",第 693 行,重新加注 提升价值 文件 "C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\retrying.py",第 200 行,调用中 attempt = Attempt(fn(*args, **kwargs), attempt_number, 假) 文件 "C:\ProgramData\Anaconda3\lib\site-packages\pip\utils__init__.py",第 102 行,在 rmtree 中 onerror=rmtree_errorhandler) 文件 "C:\ProgramData\Anaconda3\lib\shutil.py",第 494 行,在 rmtree 中 return _rmtree_unsafe(路径,出错) 文件 "C:\ProgramData\Anaconda3\lib\shutil.py",第 393 行,在 _rmtree_unsafe 中 onerror(os.rmdir,路径,sys.exc_info()) 文件 "C:\ProgramData\Anaconda3\lib\site-packages\pip\utils__init__.py",第 114 行,在 rmtree_errorhandler 中 功能(路径) PermissionError: [WinError 32] 该进程无法访问该文件,因为它正被另一个进程使用:'C:\Users\micha\AppData\Local\Temp\pip-build-t86penrg\pytorch'

我也试过 conda install -c peterjc123 pytorch=0.1.12 和 soumith 但我得到同样的错误未找到

知道我哪里出错了

尝试了其他论坛提示 post 也重新安装了 Anaconda,但问题仍然存在

但是我在这里找到了如何在 windows 上使用 Pytorch: [https://www.superdatascience.com/pytorch/]

conda 安装-c peterjc123 pytorch

对我有用吗...