전체 글 37

[Error] WARNING: The script jupyter-console is installed in which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

* $ pip install jupyter로 jupyter를 설치한 후 jupyter가 실행되지 않는 문제 --> jupyter 명령어의 shell 환경변수 설정이 되지 않아, shell에서 바로 실행할 수 없는 것이다. --> 환경변수를 추가해주면 된다. $ export PATH=$PATH:[에러에 뜬 경로 그대로]

InternalError: Graph execution error: Detected at node 'StatefulPartitionedCall 8' defined at (most recent call last):

* Tensorflow 2.12 문제 모델 생성, 컴파일 후 fit 할 때 해당 에러가 발생했다. 1. Tensorflow 버전 다운그레이드 하기 $ pip3 install tensorflow==2.11.0 → 이렇게 하니까 ImportError: cannot import name 'range_op' from 'tensorflow.python.data.ops' 이런 에러 다시 발생 ▶ 결론 : 에러 해결 2. Tensorflow-gpu 버전으로 다시 깔기 $ pip3 install tensorflow-gpu==2.11.0

Tensorflow, pyTorch - 원하는 GPU 할당

모델 학습을 하기 위해 원하는 GPU만 사용하기 위해서는 python의 os 모듈을 통해 간단히 접근할 수 있는 GPU 번호를 제한해주면 된다. 1. 1개의 단일 GPU 사용 import os os.environ['CUDA_VISIBLE_DEVICES'] = '0' 2. 2개 이상의 multi-GPU 사용 (ex. 0번, 1번) import os os.environ['CUDA_VISIBLE_DEVICES'] = '0, 1' 이렇게 하고 1. Tensorflow tensorflow.distribute의 MirroredStrategy를 바로 사용해주면 된다. 위에서 이미 GPU를 제한했기 때문에 따로 설정해줄 것은 없다. 단지 선언한 mirrored_strategy안에 모델 define부터 모델 생성, c..

[Mac] Terminal에서 명령어 install 하기

Mac은 리눅스의 apt, apt-get, pip 등과 마찬가지로 brew라는 명령어로 패키지를 설치할 수 있다. * 설치방법 1. brew 설치 $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 2. brew 환경변수 설정 - brew를 설치하면 제일 마지막에 ==> Next steps: 가 뜬다. - Next steps에서 나오는 3개의 명령어를 차례대로 복사해서 Terminal에 입력해주면 된다. - Terminal에서 나오는 echo부터 첫번째 /.zprofile까지 복사해서 입력하고, 또 echo부터 /.zprofile까지 입력하고, 그 다음 eval부터 shellenv)..

Setting, Error/Mac 2022.12.15

파일 전송 sftp 사용법

0. 접속 ssh 사용할 때와 비슷하다고 생각하면 된다. $ sftp [계정명]@[ip주소] * 포트를 따로 지정해야할 때는 $ sftp -P [포트번호] [계정명]@[ip 주소] ex) sftp -P 22 root@127.0.0.1 * 모든 파일의 목록을 확인하는 ls 명령어나, cd같은 다른 명령어를 사용할 수 있다. * 다른 명령어와 같이 사용하여 효과적으로 sftp를 사용하면 된다. 1. 원격 서버에서 내 로컬에 가져오고 싶을 때 1-1) 파일 가져오기 $ get [파일 이름 or 파일 경로] ex) $ get Untitled.ipynb ex) $ get /home/Docker/project1/Untitled.ipynb 1-2) 폴더 가져오기 $ get -r [폴더 이름 or 폴더 경로] ex) ..

[jupyter] jupyter notebook, lab 설치

$ pip3 install jupyter notebook $ pip3 install jupyterlab $ jupyter lab password $ jupyter lab --allow-root --ip=0.0.0.0 --port=8888 & $ ifconfig ifconfig 명령어로 자신의 ip를 확인한 후 인터넷 창(ex. 크롬)에 들어가서 주소창에 ip:포트번호를 입력하면 된다. ex) 127.0.0.1:8888 ▶ jupyter lab과 jupyter notebook을 호환하여 함께 사용할 수 있다. 포트번호 바로 뒤에 /lab 을 붙이면 jupyter Lab 실행 ex) 127.0.0.1:8888/lab 포트번호 바로 뒤에 /tree 를 붙이면 jupyter Notebook 실행 ex) 127...

ERROR: Could not find a version that satisfies the requirement jupyter-lab (from versions: none)ERROR: No matching distribution found for [module]

※ 해결법 ERROR: Could not find a version that satisfies the requirement jupyter-lab (from versions: none) ERROR: No matching distribution found for jupyter-lab Arguments: (UpgradePrompt(old='22.1.2', new='22.2.2'),) 이런 식으로 어떻게 해결해야 하는지 말해준다. prompt를 22.2.2 버전으로 업그레이드 하라고 하니, 업그레이드 해주면 된다. $ pip3 install --upgrade pip