pytorch PIP和CONDA错误? [英] pytorch PIP and CONDA error?

查看:245
本文介绍了pytorch PIP和CONDA错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Guys I am new to python and deeplearning world

我尝试使用conda安装pytorch

I tried to install pytorch using conda

我收到此错误...

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

`解决环境:失败

`Solving environment: failed

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

PackagesNotFoundError: The following packages are not available from current channels:

  • 火炬

当前频道:

  • https://repo.continuum.io/pkgs/main/win-64
  • https://repo.continuum.io/pkgs/main/noarch
  • https://repo.continuum.io/pkgs/free/win-64

由于堆栈溢出的信誉问题,无法发布所有频道...

Couldnt post all the channels due to reputation issue on stackoverflow...

尝试安装Pytorch的Pip只会在出现此错误后打开pytorch站点:

Trying Pip for installing Pytorch It just opens pytorch site after this error:

(基本)C:\ WINDOWS \ system32> pip install pytorch 收集火炬 使用缓存的pytorch-0.1.2.tar.gz 用于收集包裹的建筑轮子:pytorch 运行pytorch的setup.py bdist_wheel ...错误 来自命令C:\ ProgramData \ Anaconda3 \ python.exe -u -c的完整输出,导入设置工具,标记化; 文件 ='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: 追溯(最近一次通话): 文件",第1行,在 文件"C:\ Users \ micha \ AppData \ Local \ Temp \ pip-build-t86penrg \ pytorch \ setup.py",第17行 引发异常(消息) 例外:您应该从 http://pytorch.org

(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的建筑轮子失败 为pytorch运行setup.py clean 无法建立pytorch 安装收集的软件包:pytorch 正在运行pytorch的setup.py install ...错误 来自命令C:\ ProgramData \ Anaconda3 \ python.exe -u -c的完整输出,导入设置工具,标记化; 文件 ='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-单一版本-外部管理-编译: 追溯(最近一次通话): 文件",第1行,在 第13行中的文件"C:\ Users \ micha \ AppData \ Local \ Temp \ pip-build-t86penrg \ pytorch \ setup.py" 引发异常(消息) 例外:您应该从 http://pytorch.org


Failed building wheel for pytorch Running setup.py clean for pytorch Failed to build pytorch Installing collected packages: pytorch Running setup.py install 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'))" install --record C:\Users\micha\AppData\Local\Temp\pip-vms7q49e-record\install-record.txt --single-version-externally-managed --compile: Traceback (most recent call last): File "", line 1, in File "C:\Users\micha\AppData\Local\Temp\pip-build-t86penrg\pytorch\setup.py", line 13, in raise Exception(message) Exception: You should install pytorch from http://pytorch.org

----------------------------------------

例外: 追溯(最近一次通话): 运行中的文件"C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ pip \ commands \ install.py",第342行 prefix = options.prefix_path, 安装中的文件"C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ pip \ req \ req_set.py",行784 **夸克 安装中的文件"C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ pip \ req \ req_install.py",行878 spinner = spinner, 在call_subprocess中的第707行中,文件"C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ pip \ utils__init __.py" %(command_desc,proc.returncode,cwd)) pip.exceptions.InstallationError:命令"C:\ ProgramData \ Anaconda3 \ python.exe -u -c"导入设置工具,标记化; 文件 ='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')))安装--record C:\ Users \ micha \ AppData \ Local \ Temp \ pip-vms7q49e-record \ install-record.txt-单一版本-外部管理--compile"失败,错误代码为1:C:\ Users \ micha \ AppData \ Local \ Temp \ pip-build -t86penrg \ pytorch \

Exception: Traceback (most recent call last): File "C:\ProgramData\Anaconda3\lib\site-packages\pip\commands\install.py", line 342, in run prefix=options.prefix_path, File "C:\ProgramData\Anaconda3\lib\site-packages\pip\req\req_set.py", line 784, in install **kwargs File "C:\ProgramData\Anaconda3\lib\site-packages\pip\req\req_install.py", line 878, in install spinner=spinner, File "C:\ProgramData\Anaconda3\lib\site-packages\pip\utils__init__.py", line 707, in call_subprocess % (command_desc, proc.returncode, cwd)) pip.exceptions.InstallationError: 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'))" install --record C:\Users\micha\AppData\Local\Temp\pip-vms7q49e-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\micha\AppData\Local\Temp\pip-build-t86penrg\pytorch\

在处理上述异常期间,发生了另一个异常:

During handling of the above exception, another exception occurred:

回溯(最近通话最近): 主目录中的文件"C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ pip \ basecommand.py",第215行 状态= self.run(选项,参数) 运行中的文件"C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ pip \ commands \ install.py",行385 require_set.cleanup_files() 在cleanup_files中的第729行,文件"C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ pip \ req \ req_set.py" req.remove_temporary_source() 文件"C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ pip \ req \ req_install.py",行977,在remove_temporary_source中 rmtree(self.source_dir) 包裹在F中的文件"C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ pip_vendor \ retrying.py",第49行 返回Retrying(* dargs,** dkw).call(f,* args,** kw) 调用中的文件"C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ pip_vendor \ retrying.py",行212 提高try.get() 在get中的文件"C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ pip_vendor \ retrying.py",第247行 6.reraise(self.value [0],self.value [1],self.value [2]) 重新募集文件"C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ six.py",行693 提高价值 通话中第200行的文件"C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ pip_vendor \ retrying.py" 尝试=尝试(fn(* args,** kwargs),try_number,False) rmtree中的第102行的文件"C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ pip \ utils__init __.py" onerror = rmtree_errorhandler) rmtree中的文件"C:\ ProgramData \ Anaconda3 \ lib \ shutil.py",第494行 返回_rmtree_unsafe(路径,错误) _rmtree_unsafe中的第393行的文件"C:\ ProgramData \ Anaconda3 \ lib \ shutil.py" onerror(os.rmdir,path,sys.exc_info()) rmtree_errorhandler中的第114行的文件"C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ pip \ utils__init __.py" func(路径) PermissionError:[WinError 32]该进程无法访问文件,因为它正在被另一个进程使用:'C:\ Users \ micha \ AppData \ Local \ Temp \ pip-build-t86penrg \ pytorch'

Traceback (most recent call last): File "C:\ProgramData\Anaconda3\lib\site-packages\pip\basecommand.py", line 215, in main status = self.run(options, args) File "C:\ProgramData\Anaconda3\lib\site-packages\pip\commands\install.py", line 385, in run requirement_set.cleanup_files() File "C:\ProgramData\Anaconda3\lib\site-packages\pip\req\req_set.py", line 729, in cleanup_files req.remove_temporary_source() File "C:\ProgramData\Anaconda3\lib\site-packages\pip\req\req_install.py", line 977, in remove_temporary_source rmtree(self.source_dir) File "C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\retrying.py", line 49, in wrapped_f return Retrying(*dargs, **dkw).call(f, *args, **kw) File "C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\retrying.py", line 212, in call raise attempt.get() File "C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\retrying.py", line 247, in get six.reraise(self.value[0], self.value[1], self.value[2]) File "C:\ProgramData\Anaconda3\lib\site-packages\six.py", line 693, in reraise raise value File "C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\retrying.py", line 200, in call attempt = Attempt(fn(*args, **kwargs), attempt_number, False) File "C:\ProgramData\Anaconda3\lib\site-packages\pip\utils__init__.py", line 102, in rmtree onerror=rmtree_errorhandler) File "C:\ProgramData\Anaconda3\lib\shutil.py", line 494, in rmtree return _rmtree_unsafe(path, onerror) File "C:\ProgramData\Anaconda3\lib\shutil.py", line 393, in _rmtree_unsafe onerror(os.rmdir, path, sys.exc_info()) File "C:\ProgramData\Anaconda3\lib\site-packages\pip\utils__init__.py", line 114, in rmtree_errorhandler func(path) PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\Users\micha\AppData\Local\Temp\pip-build-t86penrg\pytorch'

我还尝试了conda install -c peterjc123 pytorch = 0.1.12和soumith,但未找到相同的错误

I also tried conda install -c peterjc123 pytorch=0.1.12 and soumith but I get the same error not found

任何想法,我要去哪里错了

Any Idea where I am going wrong

尝试了其他论坛技巧,并且帖子也重新安装了Anaconda,但仍然是同一问题

Tried other forum tips and post also reinstalled Anaconda but still the same issue

推荐答案

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

However I found how to use Pytorch on windows here: [https://www.superdatascience.com/pytorch/]

conda install -c peterjc123 pytorch

conda install -c peterjc123 pytorch

这是我的把戏吗...

Did the trick for me ...

这篇关于pytorch PIP和CONDA错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆