pytorch PIP和CONDA错误?(pytorch PIP and CONDA error?)

编程入门 行业动态 更新时间:2024-10-23 16:16:48
pytorch PIP和CONDA错误?(pytorch PIP and CONDA error?)

伙计我是python和deeplearning世界的新手

我尝试使用conda安装pytorch

我得到这个错误......

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

`解决环境:失败

PackagesNotFoundError:当前渠道无法使用以下软件包:

pytorch

目前的渠道:

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

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

由于stackoverflow上的声誉问题,无法发布所有频道...

尝试Pip安装Pytorch它只是在这个错误后打开pytorch站点:

(基础)C:\ WINDOWS \ system32> pip install pytorch收集pytorch使用缓存pytorch-0.1.2.tar.gz为收集的包构建轮子:pytorch运行setup.py bdist_wheel for pytorch ... error从命令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(最近一次调用最后一次):文件”“,第1行,在文件中“C:\ Users \ micha \ AppData \ Local \ Temp \ pip-build-t86penrg \ pytorch \ setup.py”,第17行,in raise异常(消息)例外:你应该从http://pytorch.org安装pytorch


pytorch构建轮失败运行setup.py clean for pytorch无法构建pytorch安装收集的软件包:pytorch运行setup.py install for pytorch ... error从命令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-external-managed --compile:Traceback(最近一次调用最后一次):文件“”,第1行,在文件“C:\ Users \ micha \ AppData \ Local \ Temp \ pip-build-t86penrg \ pytorch \ setup.py”中,第13行,在引发异常(消息)异常:你应该从http:// pytorch安装pytorch .ORG

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

异常:回溯(最近一次调用最后一次):文件“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行,在install spinner = spinner中,文件“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-external-managed --compile“在C中失败,错误代码为1:\ Users \ micha \ AppData \ Local \ Temp \ pip-集结t86penrg \ pytorch \

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

回溯(最近一次调用最后一次):文件“C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ pip \ basecommand.py”,第215行,主状态= self.run(options,args)文件“C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ pip \ commands \ install.py“,第385行,运行require_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中返回重试(* dargs,** dkw).call(f,* args,** kw)文件”C :\ ProgramData \ Anaconda3 \ lib \ site-packages \ pip_vendor \ retrying.py“,第212行,在call raise attempt.get()文件”C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ pip_vendor \ retrying.py “,第247行,获取six.reraise(self.value [0],self.value [1],self.value [2])文件”C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ s ix.py“,第693行,在重新提升值文件”C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ pip_vendor \ retrying.py“,第200行,在调用尝试中=尝试(fn(* args,** kwargs),attempt_number,False)文件“C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ pip \ utils__init __。py”,第102行,rmtree onerror = rmtree_errorhandler)文件“C:\ ProgramData \ Anaconda3 \ lib \ shutil .py“,第494行,在rmtree中返回_rmtree_unsafe(path,onerror)文件”C:\ ProgramData \ Anaconda3 \ lib \ shutil.py“,第393行,在_rmtree_unsafe onerror中(os.rmdir,path,sys.exc_info() )文件“C:\ ProgramData \ Anaconda3 \ lib \ site-packages \ pip \ utils__init __。py”,第114行,在rmtree_errorhandler中func(path)PermissionError:[WinError 32]进程无法访问该文件,因为它正在被文件使用另一个进程:'C:\ Users \ micha \ AppData \ Local \ Temp \ pip-build-t86penrg \ pytorch'

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

任何我想错的想法

试过其他的论坛提示和帖子也重新安装了Anaconda但仍然是同样的问题

Guys I am new to python and deeplearning world

I tried to install pytorch using conda

I get this Error...

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

`Solving environment: failed

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

pytorch

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...

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

(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


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

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

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:

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'

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

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

最满意答案

但是我发现如何在Windows上使用Pytorch:[ https://www.superdatascience.com/pytorch/]

conda install -c peterjc123 pytorch

对我来说诀窍......

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

conda install -c peterjc123 pytorch

Did the trick for me ...

更多推荐

本文发布于:2023-07-22 18:26:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1222325.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   PIP   pytorch   error   CONDA

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!