파이토치 설치가 않되요, 파이토치 설치가 이렇게 어려운거였나?

가상환경 만든 상황에서

(torch_book) C:\Users\철수>conda env list

conda environments:

base C:\Anaconda3
system_trading_py38_32 C:\Anaconda3\envs\system_trading_py38_32
torch_book * C:\Anaconda3\envs\torch_book
C:\ProgramData\Anaconda3

(torch_book) C:\Users\철수>

아래와 같이 pytorch 특정 버젼을 설치하려고 하면 에러가 나요…

(torch_book) C:\Users\철수>conda install pytorch==1.9.0 torchvision==0.10.0 torchaudio==0.9.0 -c pytorch
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

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

  • torchaudio==0.9.0
  • pytorch==1.9.0
  • torchvision==0.10.0

Current channels:

To search for alternate channels that may provide the conda package you’re
looking for, navigate to

https://anaconda.org

and use the search bar at the top of the page.

(torch_book) C:\Users\철수>

뭐가 문제 일까요?

참고로 설치하려는 곳은 노트북으로
GTX 765M 이라서
CUDA , cuDNN 등은 설치 불가로 알고 있습니다.

(torch_book) C:\Users\철수>pip install torch==1.9.0 torchvision==0.10.0 torchaudio==0.9.0
ERROR: Could not find a version that satisfies the requirement torch==1.9.0 (from versions: none)
ERROR: No matching distribution found for torch==1.9.0
WARNING: You are using pip version 21.2.1; however, version 22.0.4 is available.
You should consider upgrading via the ‘C:\Anaconda3\envs\torch_book\python.exe -m pip install --upgrade pip’ command.

(torch_book) C:\Users\철수>

위와 같이 conda install 이 아닌 pip install 로 하면
pip 업그레이드 하라고 warning 이 뜨네요

하여 안내 문구대로 pip 업그레이드 하려고 실행하면

(torch_book) C:\Users\철수>C:\Anaconda3\envs\torch_book\python.exe -m pip install --upgrade pip
Requirement already satisfied: pip in c:\users\철수\appdata\roaming\python\python39\site-packages (21.2.1)
Collecting pip
Using cached pip-22.0.4-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 21.2.1
Uninstalling pip-21.2.1:
Successfully uninstalled pip-21.2.1
Rolling back uninstall of pip
Moving to c:\users\철수\appdata\roaming\python\python39\scripts\pip.exe
from C:\Users\Public\Documents\ESTsoft\CreatorTemp\pip-uninstall-rpcap9b6\pip.exe
Moving to c:\users\철수\appdata\roaming\python\python39\scripts\pip3.9.exe
from C:\Users\Public\Documents\ESTsoft\CreatorTemp\pip-uninstall-rpcap9b6\pip3.9.exe
Moving to c:\users\철수\appdata\roaming\python\python39\scripts\pip3.exe
from C:\Users\Public\Documents\ESTsoft\CreatorTemp\pip-uninstall-rpcap9b6\pip3.exe
Moving to c:\users\철수\appdata\roaming\python\python39\site-packages\pip-21.2.1.dist-info
from C:\Users\동환\AppData\Roaming\Python\Python39\site-packages~ip-21.2.1.dist-info
Moving to c:\users\철수\appdata\roaming\python\python39\site-packages\pip
from C:\Users\철수\AppData\Roaming\Python\Python39\site-packages~ip
ERROR: Exception:
Traceback (most recent call last):
File “C:\Users\철수\AppData\Roaming\Python\Python39\site-packages\pip_internal\cli\base_command.py”, line 173, in main
status = self.run(options, args)
File “C:\Users\철수\AppData\Roaming\Python\Python39\site-packages\pip_internal\cli\req_command.py”, line 203, in wrapper
return func(self, options, args)
File “C:\Users\철수\AppData\Roaming\Python\Python39\site-packages\pip_internal\commands\install.py”, line 390, in run
installed = install_given_reqs(
File "C:\Users\철수\AppData\Roaming\Python\Python39\site-packages\pip_internal\req_init
.py", line 73, in install_given_reqs
requirement.install(
File “C:\Users\철수\AppData\Roaming\Python\Python39\site-packages\pip_internal\req\req_install.py”, line 758, in install
install_wheel(
File “C:\Users\철수\AppData\Roaming\Python\Python39\site-packages\pip_internal\operations\install\wheel.py”, line 794, in install_wheel
_install_wheel(
File “C:\Users\철수\AppData\Roaming\Python\Python39\site-packages\pip_internal\operations\install\wheel.py”, line 704, in _install_wheel
generated_console_scripts = maker.make_multiple(scripts_to_generate)
File “C:\Users\철수\AppData\Roaming\Python\Python39\site-packages\pip_vendor\distlib\scripts.py”, line 422, in make_multiple
filenames.extend(self.make(specification, options))
File “C:\Users\철수\AppData\Roaming\Python\Python39\site-packages\pip_internal\operations\install\wheel.py”, line 448, in make
return super().make(specification, options)
File “C:\Users\철수\AppData\Roaming\Python\Python39\site-packages\pip_vendor\distlib\scripts.py”, line 411, in make
self._make_script(entry, filenames, options=options)
File “C:\Users\철수\AppData\Roaming\Python\Python39\site-packages\pip_vendor\distlib\scripts.py”, line 312, in _make_script
self._write_script(scriptnames, shebang, script, filenames, ext)
File “C:\Users\철수\AppData\Roaming\Python\Python39\site-packages\pip_vendor\distlib\scripts.py”, line 242, in _write_script
launcher = self._get_launcher(‘t’)
File “C:\Users\철수\AppData\Roaming\Python\Python39\site-packages\pip_vendor\distlib\scripts.py”, line 390, in _get_launcher
raise ValueError(msg)
ValueError: Unable to find resource t32.exe in package pip._vendor.distlib
WARNING: You are using pip version 21.2.1; however, version 22.0.4 is available.
You should consider upgrading via the ‘C:\Anaconda3\envs\torch_book\python.exe -m pip install --upgrade pip’ command.

(torch_book) C:\Users\철수>

이마저도 제대로 되 지 않는…

산넘어 산 이네요 ^^;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

어떤책에서는 아래와 같이 하라고해서

(torch_book) C:\Users\철수>conda env list

conda environments:

base C:\Anaconda3
system_trading_py38_32 C:\Anaconda3\envs\system_trading_py38_32
torch_book * C:\Anaconda3\envs\torch_book
C:\ProgramData\Anaconda3

(torch_book) C:\Users\철수>conda install pytorch-cpu torchvision-cpu -c pytorch
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

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

  • pytorch-cpu

Current channels:

To search for alternate channels that may provide the conda package you’re
looking for, navigate to

https://anaconda.org

and use the search bar at the top of the page.

(torch_book) C:\Users\철수>

위와 같이 않되네요…헐…

pytorch 설치하기가 이렇게 어려워서야…헐…

안녕하세요 @digerati518 님.

먼저 저는 macOS / Linux에서 pyenv와 pip를 사용하고 있고, CUDA 등의 환경은 docker를 쓰고 있어서 정확한 답변이 아닐 수도 있는 점 참고 부탁드립니다.

다만 아래와 같이 나오는 것으로 봐서는 채널 또는 패키지 지정이 잘못 되었을 것 같니다.

홈페이지에는 Conda + Windows의 설치 중, CPU Only의 경우 cpuonly가 명시되어 있는데요,
혹시 기존에 입력하셨던 명령어 대신 아래 명령어로도 안되시는지 한 번 시도해보시면 어떨까요?

Linux and Windows
# CUDA 10.2
conda install pytorch==1.9.0 torchvision==0.10.0 torchaudio==0.9.0 cudatoolkit=10.2 -c pytorch

# CUDA 11.3
conda install pytorch==1.9.0 torchvision==0.10.0 torchaudio==0.9.0 cudatoolkit=11.3 -c pytorch -c conda-forge

# CPU Only
conda install pytorch==1.9.0 torchvision==0.10.0 torchaudio==0.9.0 cpuonly -c pytorch

pip 설치의 경우에도 아래와 같이 1.9.0버전의 torch 패키지를 찾지 못하였다고 나오는 것 같은데요,

아래 명령어 대신 홈페이지 상의 CPU Only 부분에 따라서 1.9.0+cpu로 버전을 명시하여 다시 시도해보시면 어떠실까요?

# CUDA 11.1
pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html

# CUDA 10.2
pip install torch==1.9.0+cu102 torchvision==0.10.0+cu102 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html

# CPU only
pip install torch==1.9.0+cpu torchvision==0.10.0+cpu torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html

질문에 세새한 답변을 주시니 먼저 감사드립니다.

님께서 제안한 방법중

저의 경우 노트북이 GTX 765M 이라 CUDA, cuDNN 등이 설치가 불가한듯 하여
아예 CUDA등등은 포기하고 CPU 모드에서만 사용하기 위해

CPU ONLY PIP 만 아래와 같이 시도를 해봤습니다만…

(torch_book) C:\Users\철수>pip install torch==1.9.0+cpu torchvision==0.10.0+cpu torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
Looking in links: https://download.pytorch.org/whl/torch_stable.html
ERROR: Could not find a version that satisfies the requirement torch==1.9.0+cpu (from versions: none)
ERROR: No matching distribution found for torch==1.9.0+cpu
WARNING: You are using pip version 21.2.1; however, version 22.0.4 is available.
You should consider upgrading via the ‘C:\Anaconda3\envs\torch_book\python.exe -m pip install --upgrade pip’ command.

(torch_book) C:\Users\철수>

와 같이 않되네요 ^^ 다른 방법은 없을까요?

시중의 어느 한책에 나오는 것을 따라 하며 하던중 정작 파이토치도 설치되 않되니
허망하기 짝이 없고
저자 가 답변하는 곳이 없어 출판사에 함께 질의 하였는데
저자, 출판사 보다도 님께서 먼저 도움을 주시네요,

다른 방법이 있을지 궁금합니다 ^^

안녕하세요, 책에서 안내한 command 가 실행되지 않아 난처하시겠어요.

conda 명령어 실행하셨을 때 current channel이 win-32 또는 noarch로 나오는 부분을 의심해 봐야할 것 같습니다.
pip로 설치하시는 파일 목록인 https://download.pytorch.org/whl/torch_stable.html 를 보시면 지원하는 wheel 파일 중 32 bit를 지원하는 경우가 없습니다.
conda 도 마찬가지구요. conda로 설치하시고자 하는 패키지, 예를 들어 Pytorch Cpu :: Anaconda.org 를 보시면, linux-64와 win-64만 지원한다는 걸 확인하실 수 있습니다.

현재 사용하시는 Anaconda를 과거에 32-bit Installer 사용하여 설치하신 건 아닐까 하는 생각이 드는데요, 64-bit installer를 사용하여 아나콘다를 다시 설치하시고 pytorch 실습을 위한 가상환경 생성을 해보시면 될 것 같습니다.

과거에 의도적으로 32-bit python을 사용하셨던 것으로 보여 덧붙이자면,
64-bit 아나콘다 위에, 32-bit 사용하는 가상환경도 따로 생성할 수 있는 것 같습니다. 이 블로그에서 64비트 아나콘다에서 32bit 파이썬 설치하는 방법 잘 설명해주는 것으로 보입니다.

혹시 다른 에러가 발생하면 또 알려 주세요!

1개의 좋아요

예 맞아요, 예전에 32bit python을 설치햇던적이 있는데 지금도 남아잇는지는 모르겠어요

님께서 말씀하신대로 예전에 관심을 갖던 책들이 32bit로 설치해야 된다 해서 32bit 설치한적이 있는데

이후 책들에선 님의 말씀처럼 64bit 설치후 가상환경으로 32bit를 설치사용가능하다 해서
저도그랬던듯 합니다.

확인해봐야 겠네요

일단 현재 설치 되어있는 것이 무엇인지 확인해야 되고
장애를 발생시키는 것들을 제거 해야 될듯 한대…

어떻게 해야 될지…

파이토치 설치 에러 관련 파이썬 설치현황

확인 해보니 위 와 같네요

일단 모두 삭제하고 책의 내용만 다시 해야 될지?

고민중입니다.

아나콘다 3 32bit, 64bit,

python은 64bit 버젼 2개

launcher 1개

그리고 pycharm community 1개 인데

일단, 32bit가 문제 이니

anaconda3 32bit 만 먼저 제거 해보고

문제의

파이토치를 설치 해보겠습니다.

64-bit anaconda prompt에서 pytorch 설치 시도해보시면 어떠실까 싶네요.

(base) C:\Users\동환>conda env list

conda environments:

base * C:\ProgramData\Anaconda3

(base) C:\Users\동환>conda create -n torch_book python=3.9.0
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done

==> WARNING: A newer version of conda exists. <==
current version: 4.10.3
latest version: 4.12.0

Please update conda by running

$ conda update -n base -c defaults conda

Package Plan

environment location: C:\Users\동환.conda\envs\torch_book

added / updated specs:
- python=3.9.0

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
ca-certificates-2022.3.29  |       haa95532_0         122 KB
certifi-2021.10.8          |   py39haa95532_2         152 KB
openssl-1.1.1n             |       h2bbff1b_0         4.8 MB
python-3.9.0               |       h6244533_2        16.4 MB
sqlite-3.38.2              |       h2bbff1b_0         807 KB
tzdata-2022a               |       hda174b7_0         109 KB
wheel-0.37.1               |     pyhd3eb1b0_0          33 KB
------------------------------------------------------------
                                       Total:        22.5 MB

The following NEW packages will be INSTALLED:

ca-certificates pkgs/main/win-64::ca-certificates-2022.3.29-haa95532_0
certifi pkgs/main/win-64::certifi-2021.10.8-py39haa95532_2
openssl pkgs/main/win-64::openssl-1.1.1n-h2bbff1b_0
pip pkgs/main/win-64::pip-21.2.4-py39haa95532_0
python pkgs/main/win-64::python-3.9.0-h6244533_2
setuptools pkgs/main/win-64::setuptools-58.0.4-py39haa95532_0
sqlite pkgs/main/win-64::sqlite-3.38.2-h2bbff1b_0
tzdata pkgs/main/noarch::tzdata-2022a-hda174b7_0
vc pkgs/main/win-64::vc-14.2-h21ff451_1
vs2015_runtime pkgs/main/win-64::vs2015_runtime-14.27.29016-h5e58377_2
wheel pkgs/main/noarch::wheel-0.37.1-pyhd3eb1b0_0
wincertstore pkgs/main/win-64::wincertstore-0.2-py39haa95532_2

Proceed ([y]/n)? y

Downloading and Extracting Packages
certifi-2021.10.8 | 152 KB | ############################################################################ | 100%
python-3.9.0 | 16.4 MB | ############################################################################ | 100%
sqlite-3.38.2 | 807 KB | ############################################################################ | 100%
ca-certificates-2022 | 122 KB | ############################################################################ | 100%
openssl-1.1.1n | 4.8 MB | ############################################################################ | 100%
wheel-0.37.1 | 33 KB | ############################################################################ | 100%
tzdata-2022a | 109 KB | ############################################################################ | 100%

InvalidArchiveError(“Error with archive C:\Users\동환\.conda\pkgs\certifi-2021.10.8-py39haa95532_2v3btapmh\info-certifi-2021.10.8-py39haa95532_2.tar.zst. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nFailed to open ‘C:\Users\동환\.conda\pkgs\certifi-2021.10.8-py39haa95532_2v3btapmh\info-certifi-2021.10.8-py39haa95532_2.tar.zst’”)
InvalidArchiveError(“Error with archive C:\Users\동환\.conda\pkgs\python-3.9.0-h6244533_2ie05mwvi\info-python-3.9.0-h6244533_2.tar.zst. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nFailed to open ‘C:\Users\동환\.conda\pkgs\python-3.9.0-h6244533_2ie05mwvi\info-python-3.9.0-h6244533_2.tar.zst’”)
InvalidArchiveError(“Error with archive C:\Users\동환\.conda\pkgs\sqlite-3.38.2-h2bbff1b_02serm83b\info-sqlite-3.38.2-h2bbff1b_0.tar.zst. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nFailed to open ‘C:\Users\동환\.conda\pkgs\sqlite-3.38.2-h2bbff1b_02serm83b\info-sqlite-3.38.2-h2bbff1b_0.tar.zst’”)
InvalidArchiveError(“Error with archive C:\Users\동환\.conda\pkgs\ca-certificates-2022.3.29-haa95532_0i4dvctp9\info-ca-certificates-2022.3.29-haa95532_0.tar.zst. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nFailed to open ‘C:\Users\동환\.conda\pkgs\ca-certificates-2022.3.29-haa95532_0i4dvctp9\info-ca-certificates-2022.3.29-haa95532_0.tar.zst’”)
InvalidArchiveError(“Error with archive C:\Users\동환\.conda\pkgs\openssl-1.1.1n-h2bbff1b_0tv5q30bd\info-openssl-1.1.1n-h2bbff1b_0.tar.zst. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nFailed to open ‘C:\Users\동환\.conda\pkgs\openssl-1.1.1n-h2bbff1b_0tv5q30bd\info-openssl-1.1.1n-h2bbff1b_0.tar.zst’”)
InvalidArchiveError(“Error with archive C:\Users\동환\.conda\pkgs\wheel-0.37.1-pyhd3eb1b0_017d32can\info-wheel-0.37.1-pyhd3eb1b0_0.tar.zst. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nFailed to open ‘C:\Users\동환\.conda\pkgs\wheel-0.37.1-pyhd3eb1b0_017d32can\info-wheel-0.37.1-pyhd3eb1b0_0.tar.zst’”)
InvalidArchiveError(“Error with archive C:\Users\동환\.conda\pkgs\tzdata-2022a-hda174b7_07ztcn0ka\info-tzdata-2022a-hda174b7_0.tar.zst. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nFailed to open ‘C:\Users\동환\.conda\pkgs\tzdata-2022a-hda174b7_07ztcn0ka\info-tzdata-2022a-hda174b7_0.tar.zst’”)

(base) C:\Users\동환>conda env list

conda environments:

base * C:\ProgramData\Anaconda3

(base) C:\Users\동환>conda create -n torch_book python=3.9.0
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done

==> WARNING: A newer version of conda exists. <==
current version: 4.10.3
latest version: 4.12.0

Please update conda by running

$ conda update -n base -c defaults conda

Package Plan

environment location: C:\Users\동환.conda\envs\torch_book

added / updated specs:
- python=3.9.0

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
ca-certificates-2022.3.29  |       haa95532_0         122 KB
certifi-2021.10.8          |   py39haa95532_2         152 KB
openssl-1.1.1n             |       h2bbff1b_0         4.8 MB
python-3.9.0               |       h6244533_2        16.4 MB
sqlite-3.38.2              |       h2bbff1b_0         807 KB
tzdata-2022a               |       hda174b7_0         109 KB
wheel-0.37.1               |     pyhd3eb1b0_0          33 KB
------------------------------------------------------------
                                       Total:        22.5 MB

The following NEW packages will be INSTALLED:

ca-certificates pkgs/main/win-64::ca-certificates-2022.3.29-haa95532_0
certifi pkgs/main/win-64::certifi-2021.10.8-py39haa95532_2
openssl pkgs/main/win-64::openssl-1.1.1n-h2bbff1b_0
pip pkgs/main/win-64::pip-21.2.4-py39haa95532_0
python pkgs/main/win-64::python-3.9.0-h6244533_2
setuptools pkgs/main/win-64::setuptools-58.0.4-py39haa95532_0
sqlite pkgs/main/win-64::sqlite-3.38.2-h2bbff1b_0
tzdata pkgs/main/noarch::tzdata-2022a-hda174b7_0
vc pkgs/main/win-64::vc-14.2-h21ff451_1
vs2015_runtime pkgs/main/win-64::vs2015_runtime-14.27.29016-h5e58377_2
wheel pkgs/main/noarch::wheel-0.37.1-pyhd3eb1b0_0
wincertstore pkgs/main/win-64::wincertstore-0.2-py39haa95532_2

Proceed ([y]/n)? y

Downloading and Extracting Packages
wheel-0.37.1 | 33 KB | ################################################################################################################################################################################################# | 100%
openssl-1.1.1n | 4.8 MB | ################################################################################################################################################################################################# | 100%
ca-certificates-2022 | 122 KB | ################################################################################################################################################################################################# | 100%
sqlite-3.38.2 | 807 KB | ################################################################################################################################################################################################# | 100%
python-3.9.0 | 16.4 MB | ################################################################################################################################################################################################# | 100%
certifi-2021.10.8 | 152 KB | ################################################################################################################################################################################################# | 100%
tzdata-2022a | 109 KB | ################################################################################################################################################################################################# | 100%

InvalidArchiveError(“Error with archive C:\Users\동환\.conda\pkgs\wheel-0.37.1-pyhd3eb1b0_0zvwcs_u3\info-wheel-0.37.1-pyhd3eb1b0_0.tar.zst. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nFailed to open ‘C:\Users\동환\.conda\pkgs\wheel-0.37.1-pyhd3eb1b0_0zvwcs_u3\info-wheel-0.37.1-pyhd3eb1b0_0.tar.zst’”)
InvalidArchiveError(“Error with archive C:\Users\동환\.conda\pkgs\openssl-1.1.1n-h2bbff1b_08s6i30fk\info-openssl-1.1.1n-h2bbff1b_0.tar.zst. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nFailed to open ‘C:\Users\동환\.conda\pkgs\openssl-1.1.1n-h2bbff1b_08s6i30fk\info-openssl-1.1.1n-h2bbff1b_0.tar.zst’”)
InvalidArchiveError(“Error with archive C:\Users\동환\.conda\pkgs\ca-certificates-2022.3.29-haa95532_012bpzu5j\info-ca-certificates-2022.3.29-haa95532_0.tar.zst. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nFailed to open ‘C:\Users\동환\.conda\pkgs\ca-certificates-2022.3.29-haa95532_012bpzu5j\info-ca-certificates-2022.3.29-haa95532_0.tar.zst’”)
InvalidArchiveError(“Error with archive C:\Users\동환\.conda\pkgs\sqlite-3.38.2-h2bbff1b_0r3bu_2vh\info-sqlite-3.38.2-h2bbff1b_0.tar.zst. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nFailed to open ‘C:\Users\동환\.conda\pkgs\sqlite-3.38.2-h2bbff1b_0r3bu_2vh\info-sqlite-3.38.2-h2bbff1b_0.tar.zst’”)
InvalidArchiveError(“Error with archive C:\Users\동환\.conda\pkgs\python-3.9.0-h6244533_2m6j_401f\info-python-3.9.0-h6244533_2.tar.zst. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nFailed to open ‘C:\Users\동환\.conda\pkgs\python-3.9.0-h6244533_2m6j_401f\info-python-3.9.0-h6244533_2.tar.zst’”)
InvalidArchiveError(“Error with archive C:\Users\동환\.conda\pkgs\certifi-2021.10.8-py39haa95532_2x81mmspy\info-certifi-2021.10.8-py39haa95532_2.tar.zst. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nFailed to open ‘C:\Users\동환\.conda\pkgs\certifi-2021.10.8-py39haa95532_2x81mmspy\info-certifi-2021.10.8-py39haa95532_2.tar.zst’”)
InvalidArchiveError(“Error with archive C:\Users\동환\.conda\pkgs\tzdata-2022a-hda174b7_06fpv2tt3\info-tzdata-2022a-hda174b7_0.tar.zst. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nFailed to open ‘C:\Users\동환\.conda\pkgs\tzdata-2022a-hda174b7_06fpv2tt3\info-tzdata-2022a-hda174b7_0.tar.zst’”)

(base) C:\Users\동환>

와 같이 에러가 나서
아예 파이썬
pycharm 등 모두 uninstall 해보려 합니다.

1개의 좋아요

bingo !!!

이제껏 수많은 파이썬 관련 책을 공부하면서 설치후 방치된
python, anaconda, pycharm등 죄다 uninstall 후
책대로 설치하니…

간단한 에러 몇개만 발생하고

모두 제대로 설치가 되네요…헐…

감사드립니다. 32bit 문제를 지적해주셔서
해결된듯 합니다.

감사합니다. ^^*

2개의 좋아요

혹시 나중에 찾아오실 분들을 위해 한마디 남겨둡니다.
pypi 저장소에 사용하는 python 버전에 대한 torch의 빌드가 없는 경우에도 발생하는 에러 같습니다.
예를들어 현재기준(24/01/12) python 3.12 가 설치된 환경에서 pip install torch 를 수행하면 설치 가능한 torch가 없다고 합니다.

2개의 좋아요

오, 이 부분은 생각 못 했네요 ^^;
알려주셔서 감사합니다! :bowing_man:

그러면 현재기준(24/01/14)python 3.12가 설치된 환경에서는 pip install torch 대신 써야 할 명령어가 무엇인지 알려주실 수 있을까요?

위 링크의 설명처럼 현재 torch는 python 3.8~3.11 버전을 지원합니다

위 링크처럼 pypi 저장소에는 3.11 까지에 대한 whl 파일이 있어서 pip로는 python 3.11까지 설치가 됩니다.
가장 간단한 해결법은 python을 다운그레이드 하는 것입니다.
확실하고 안정적입니다.
다음으로는 torch를 소스로부터 빌드하여 설치하는 것입니다.
설치에서 오류가 발생할 수도 있습니다.

1개의 좋아요