keris2020 / hackathon

10 stars 7 forks source link

아나콘다에서 문제가 생겼습니다. (급함) #34

Closed ksy809 closed 4 years ago

ksy809 commented 4 years ago

(base) C:\Users\User>pip uninstall tensorflow WARNING: Skipping tensorflow as it is not installed.

(base) C:\Users\User>pip install tensorflow Collecting tensorflow Using cached tensorflow-2.3.1-cp38-cp38-win_amd64.whl (342.5 MB) Requirement already satisfied: wheel>=0.26 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (0.34.2) Requirement already satisfied: absl-py>=0.7.0 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (0.11.0) Requirement already satisfied: keras-preprocessing<1.2,>=1.1.1 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (1.1.2) Requirement already satisfied: wrapt>=1.11.1 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (1.11.2) Requirement already satisfied: tensorflow-estimator<2.4.0,>=2.3.0 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (2.3.0) Requirement already satisfied: numpy<1.19.0,>=1.16.0 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (1.18.5) Requirement already satisfied: termcolor>=1.1.0 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (1.1.0) Requirement already satisfied: tensorboard<3,>=2.3.0 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (2.3.0) Requirement already satisfied: gast==0.3.3 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (0.3.3) Requirement already satisfied: grpcio>=1.8.6 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (1.33.2) Requirement already satisfied: protobuf>=3.9.2 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (3.13.0) Requirement already satisfied: h5py<2.11.0,>=2.10.0 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (2.10.0) Requirement already satisfied: google-pasta>=0.1.8 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (0.2.0) Requirement already satisfied: astunparse==1.6.3 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (1.6.3) Requirement already satisfied: six>=1.12.0 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (1.15.0) Requirement already satisfied: opt-einsum>=2.3.2 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (3.3.0) Requirement already satisfied: werkzeug>=0.11.15 in c:\programdata\anaconda3\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (1.0.1) Requirement already satisfied: requests<3,>=2.21.0 in c:\programdata\anaconda3\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (2.24.0) Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in c:\programdata\anaconda3\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (1.7.0) Requirement already satisfied: google-auth<2,>=1.6.3 in c:\programdata\anaconda3\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (1.23.0) Requirement already satisfied: markdown>=2.6.8 in c:\programdata\anaconda3\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (3.3.3) Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in c:\programdata\anaconda3\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (0.4.2) Requirement already satisfied: setuptools>=41.0.0 in c:\programdata\anaconda3\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (49.2.0.post20200714) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\programdata\anaconda3\lib\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (1.25.9) Requirement already satisfied: chardet<4,>=3.0.2 in c:\programdata\anaconda3\lib\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (3.0.4) Requirement already satisfied: certifi>=2017.4.17 in c:\programdata\anaconda3\lib\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (2020.6.20) Requirement already satisfied: idna<3,>=2.5 in c:\programdata\anaconda3\lib\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (2.10) Requirement already satisfied: cachetools<5.0,>=2.0.0 in c:\programdata\anaconda3\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (4.1.1) Requirement already satisfied: rsa<5,>=3.1.4; python_version >= "3.5" in c:\programdata\anaconda3\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (4.6) Requirement already satisfied: pyasn1-modules>=0.2.1 in c:\programdata\anaconda3\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (0.2.8) Requirement already satisfied: requests-oauthlib>=0.7.0 in c:\programdata\anaconda3\lib\site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow) (1.3.0) Requirement already satisfied: pyasn1>=0.1.3 in c:\programdata\anaconda3\lib\site-packages (from rsa<5,>=3.1.4; python_version >= "3.5"->google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (0.4.8) Requirement already satisfied: oauthlib>=3.0.0 in c:\programdata\anaconda3\lib\site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow) (3.1.0) Installing collected packages: tensorflow ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 액세스가 거부되었습니다: 'C:\ProgramData\Anaconda3\Lib\site-packages\tensorflow\python\_pywrap_tensorflow_internal.pyd' Consider using the --user option or check the permissions.

tensorflow랑 keras의 버전을 맞춰야한다고 그래서 참고 링크에 들어가서 똑같이 했는데 이렇게 뜹니다. 뭐가 잘못된 것이고 어떤식으로 고쳐야 할까요?

kjn6318 commented 4 years ago

pip uninstall 명령어가 아닌 윈도우즈 프로그램 설치/제거를 통해 파이썬을 완전히 삭제하고 아나콘다를 설치해봐주세요. 버전 충돌 문제가 있는 것 같아요. https://redcow77.tistory.com/202

taeseug commented 4 years ago

아나콘다에서 지원하는 tensorflow 버젼과 pip install 에서 설치 되는 tensorflow 버젼에는 약간의 차이가 있습니다 그 이유는 pip를 통해 설치 되는 버젼의 tensorflow version이 좀더 최신의 것이며 conda를 통해 설치 되는 버젼은 다른 package들과의 버젼 호환성을 고려하여 설치되어 약간 구버젼이 설치됩니다. 이로 인해 anaconda를 설치하신 경우에 tensorflow 의 설치는 conda install tensorflow 로 하는 게 맞습니다.

아나콘다가 현지 지원하는 텐서플로의 버젼은 2.1 버젼입니다. 위의 로그에서 보듯이 pip 에서 지원하는 버젼은 2.3 버젼입니다 . 이로 인해 설치 에러가 나는 경우 입니다.

아나콘다에서 tensorflow 버젼 확인은

conda list 하시면 확인 할 수 있습니다.

image

위그림에서 보면 tensorflow 버젼은 2.1 입니다.

Jun-Pyo-Park-PhD commented 4 years ago

일단 anaconda prompt를 관리자 권한으로 실행시켜야 할 것 같네요.

image

관리자 권한으로 켜시고 설치해보시기 바랍니다.