티스토리 뷰
1. Failed to create a virtual environment
파이참 인터프리터 생성 오류
오류 코드
Failed to create a virtual environment
원인
파이참 버전 문제
해결 방법
pycharm 2.3에서 pycharm 1.4으로 다운그레이드하니까 해결
2. 파이썬 라이브러리 import 오류
기억나는건 gluonnlp
오류 코드(꽤나 길다)
ERROR: Command errored out with exit status 1:
command: 'c:\users\sangw\appdata\local\programs\python\python38\python.exe' -u -
c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sangw\\AppData\\Local\\T
emp\\pip-install-
dzxe39ek\\gluonnlp_15f32c5f94ee4ee2967910ed42542ce2\\setup.py'"'"'; __file__='"'"'C:\\Users\\sangw\\AppData\\Local\\
Temp\\pip-install-dzxe39ek\\gluonnlp_15f32c5f94ee4e
e2967910ed42542ce2\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)
(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');co
de = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --
record 'C:\Users\sangw\AppData\Local\Temp\pip-record-44espqdv\install-record.txt' --single-version-externally-managed -
-compile --install-headers 'c:\users\sangw\appdata\local\programs\python\python38\Include\gluonnlp'
cwd: C:\Users\sangw\AppData\Local\Temp\pip-install-dzxe39ek\gluonnlp_15f32c5f94ee4ee2967910ed42542ce2\
Complete output (125 lines):
WARNING: The wheel package is not available.
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\gluonnlp
copying src\gluonnlp\base.py -> build\lib.win-amd64-3.8\gluonnlp
copying src\gluonnlp\_constants.py -> build\lib.win-amd64-3.8\gluonnlp
copying src\gluonnlp\__init__.py -> build\lib.win-amd64-3.8\gluonnlp
creating build\lib.win-amd64-3.8\gluonnlp\calibration
copying src\gluonnlp\calibration\collector.py -> build\lib.win-amd64-3.8\gluonnlp\calibration
copying src\gluonnlp\calibration\__init__.py -> build\lib.win-amd64-3.8\gluonnlp\calibration
creating build\lib.win-amd64-3.8\gluonnlp\data
copying src\gluonnlp\data\baidu_ernie_data.py -> build\lib.win-amd64-3.8\gluonnlp\data
copying src\gluonnlp\data\candidate_sampler.py -> build\lib.win-amd64-3.8\gluonnlp\data
copying src\gluonnlp\data\classification.py -> build\lib.win-amd64-3.8\gluonnlp\data
copying src\gluonnlp\data\conll.py -> build\lib.win-amd64-3.8\gluonnlp\data
copying src\gluonnlp\data\dataloader.py -> build\lib.win-amd64-3.8\gluonnlp\data
copying src\gluonnlp\data\dataset.py -> build\lib.win-amd64-3.8\gluonnlp\data
copying src\gluonnlp\data\datasetloader.py -> build\lib.win-amd64-3.8\gluonnlp\data
copying src\gluonnlp\data\glue.py -> build\lib.win-amd64-3.8\gluonnlp\data
copying src\gluonnlp\data\intent_slot.py -> build\lib.win-amd64-3.8\gluonnlp\data
copying src\gluonnlp\data\question_answering.py -> build\lib.win-amd64-3.8\gluonnlp\data
copying src\gluonnlp\data\registry.py -> build\lib.win-amd64-3.8\gluonnlp\data
copying src\gluonnlp\data\sampler.py -> build\lib.win-amd64-3.8\gluonnlp\data
copying src\gluonnlp\data\sentiment.py -> build\lib.win-amd64-3.8\gluonnlp\data
copying src\gluonnlp\data\stream.py -> build\lib.win-amd64-3.8\gluonnlp\data
copying src\gluonnlp\data\super_glue.py -> build\lib.win-amd64-3.8\gluonnlp\data
copying src\gluonnlp\data\transforms.py -> build\lib.win-amd64-3.8\gluonnlp\data
copying src\gluonnlp\data\translation.py -> build\lib.win-amd64-3.8\gluonnlp\data
copying src\gluonnlp\data\utils.py -> build\lib.win-amd64-3.8\gluonnlp\data
copying src\gluonnlp\data\word_embedding_evaluation.py -> build\lib.win-amd64-3.8\gluonnlp\data
copying src\gluonnlp\data\__init__.py -> build\lib.win-amd64-3.8\gluonnlp\data
creating build\lib.win-amd64-3.8\gluonnlp\embedding
copying src\gluonnlp\embedding\evaluation.py -> build\lib.win-amd64-3.8\gluonnlp\embedding
copying src\gluonnlp\embedding\token_embedding.py -> build\lib.win-amd64-3.8\gluonnlp\embedding
copying src\gluonnlp\embedding\__init__.py -> build\lib.win-amd64-3.8\gluonnlp\embedding
creating build\lib.win-amd64-3.8\gluonnlp\initializer
copying src\gluonnlp\initializer\initializer.py -> build\lib.win-amd64-3.8\gluonnlp\initializer
copying src\gluonnlp\initializer\__init__.py -> build\lib.win-amd64-3.8\gluonnlp\initializer
creating build\lib.win-amd64-3.8\gluonnlp\loss
copying src\gluonnlp\loss\activation_regularizer.py -> build\lib.win-amd64-3.8\gluonnlp\loss
copying src\gluonnlp\loss\label_smoothing.py -> build\lib.win-amd64-3.8\gluonnlp\loss
copying src\gluonnlp\loss\loss.py -> build\lib.win-amd64-3.8\gluonnlp\loss
copying src\gluonnlp\loss\__init__.py -> build\lib.win-amd64-3.8\gluonnlp\loss
creating build\lib.win-amd64-3.8\gluonnlp\metric
copying src\gluonnlp\metric\length_normalized_loss.py -> build\lib.win-amd64-3.8\gluonnlp\metric
copying src\gluonnlp\metric\masked_accuracy.py -> build\lib.win-amd64-3.8\gluonnlp\metric
copying src\gluonnlp\metric\__init__.py -> build\lib.win-amd64-3.8\gluonnlp\metric
creating build\lib.win-amd64-3.8\gluonnlp\model
copying src\gluonnlp\model\attention_cell.py -> build\lib.win-amd64-3.8\gluonnlp\model
copying src\gluonnlp\model\bert.py -> build\lib.win-amd64-3.8\gluonnlp\model
copying src\gluonnlp\model\bilm_encoder.py -> build\lib.win-amd64-3.8\gluonnlp\model
copying src\gluonnlp\model\block.py -> build\lib.win-amd64-3.8\gluonnlp\model
copying src\gluonnlp\model\convolutional_encoder.py -> build\lib.win-amd64-3.8\gluonnlp\model
copying src\gluonnlp\model\elmo.py -> build\lib.win-amd64-3.8\gluonnlp\model
copying src\gluonnlp\model\highway.py -> build\lib.win-amd64-3.8\gluonnlp\model
copying src\gluonnlp\model\info.py -> build\lib.win-amd64-3.8\gluonnlp\model
copying src\gluonnlp\model\language_model.py -> build\lib.win-amd64-3.8\gluonnlp\model
copying src\gluonnlp\model\lstmpcellwithclip.py -> build\lib.win-amd64-3.8\gluonnlp\model
copying src\gluonnlp\model\parameter.py -> build\lib.win-amd64-3.8\gluonnlp\model
copying src\gluonnlp\model\sampled_block.py -> build\lib.win-amd64-3.8\gluonnlp\model
copying src\gluonnlp\model\seq2seq_encoder_decoder.py -> build\lib.win-amd64-3.8\gluonnlp\model
copying src\gluonnlp\model\sequence_sampler.py -> build\lib.win-amd64-3.8\gluonnlp\model
copying src\gluonnlp\model\transformer.py -> build\lib.win-amd64-3.8\gluonnlp\model
copying src\gluonnlp\model\translation.py -> build\lib.win-amd64-3.8\gluonnlp\model
copying src\gluonnlp\model\utils.py -> build\lib.win-amd64-3.8\gluonnlp\model
copying src\gluonnlp\model\__init__.py -> build\lib.win-amd64-3.8\gluonnlp\model
creating build\lib.win-amd64-3.8\gluonnlp\optimizer
copying src\gluonnlp\optimizer\bert_adam.py -> build\lib.win-amd64-3.8\gluonnlp\optimizer
copying src\gluonnlp\optimizer\__init__.py -> build\lib.win-amd64-3.8\gluonnlp\optimizer
creating build\lib.win-amd64-3.8\gluonnlp\utils
copying src\gluonnlp\utils\files.py -> build\lib.win-amd64-3.8\gluonnlp\utils
copying src\gluonnlp\utils\parallel.py -> build\lib.win-amd64-3.8\gluonnlp\utils
copying src\gluonnlp\utils\parameter.py -> build\lib.win-amd64-3.8\gluonnlp\utils
copying src\gluonnlp\utils\seed.py -> build\lib.win-amd64-3.8\gluonnlp\utils
copying src\gluonnlp\utils\version.py -> build\lib.win-amd64-3.8\gluonnlp\utils
copying src\gluonnlp\utils\__init__.py -> build\lib.win-amd64-3.8\gluonnlp\utils
creating build\lib.win-amd64-3.8\gluonnlp\vocab
copying src\gluonnlp\vocab\bert.py -> build\lib.win-amd64-3.8\gluonnlp\vocab
copying src\gluonnlp\vocab\elmo.py -> build\lib.win-amd64-3.8\gluonnlp\vocab
copying src\gluonnlp\vocab\subwords.py -> build\lib.win-amd64-3.8\gluonnlp\vocab
copying src\gluonnlp\vocab\vocab.py -> build\lib.win-amd64-3.8\gluonnlp\vocab
copying src\gluonnlp\vocab\__init__.py -> build\lib.win-amd64-3.8\gluonnlp\vocab
creating build\lib.win-amd64-3.8\gluonnlp\data\batchify
copying src\gluonnlp\data\batchify\batchify.py -> build\lib.win-amd64-3.8\gluonnlp\data\batchify
copying src\gluonnlp\data\batchify\embedding.py -> build\lib.win-amd64-3.8\gluonnlp\data\batchify
copying src\gluonnlp\data\batchify\language_model.py -> build\lib.win-amd64-3.8\gluonnlp\data\batchify
copying src\gluonnlp\data\batchify\__init__.py -> build\lib.win-amd64-3.8\gluonnlp\data\batchify
creating build\lib.win-amd64-3.8\gluonnlp\data\bert
copying src\gluonnlp\data\bert\glue.py -> build\lib.win-amd64-3.8\gluonnlp\data\bert
copying src\gluonnlp\data\bert\squad.py -> build\lib.win-amd64-3.8\gluonnlp\data\bert
copying src\gluonnlp\data\bert\__init__.py -> build\lib.win-amd64-3.8\gluonnlp\data\bert
creating build\lib.win-amd64-3.8\gluonnlp\data\corpora
copying src\gluonnlp\data\corpora\google_billion_word.py -> build\lib.win-amd64-3.8\gluonnlp\data\corpora
copying src\gluonnlp\data\corpora\large_text_compression_benchmark.py -> build\lib.win-amd64-3.8\gluonnlp\data\corpora
copying src\gluonnlp\data\corpora\wikitext.py -> build\lib.win-amd64-3.8\gluonnlp\data\corpora
copying src\gluonnlp\data\corpora\__init__.py -> build\lib.win-amd64-3.8\gluonnlp\data\corpora
creating build\lib.win-amd64-3.8\gluonnlp\data\xlnet
copying src\gluonnlp\data\xlnet\squad.py -> build\lib.win-amd64-3.8\gluonnlp\data\xlnet
copying src\gluonnlp\data\xlnet\__init__.py -> build\lib.win-amd64-3.8\gluonnlp\data\xlnet
creating build\lib.win-amd64-3.8\gluonnlp\model\train
copying src\gluonnlp\model\train\cache.py -> build\lib.win-amd64-3.8\gluonnlp\model\train
copying src\gluonnlp\model\train\embedding.py -> build\lib.win-amd64-3.8\gluonnlp\model\train
copying src\gluonnlp\model\train\language_model.py -> build\lib.win-amd64-3.8\gluonnlp\model\train
copying src\gluonnlp\model\train\__init__.py -> build\lib.win-amd64-3.8\gluonnlp\model\train
running egg_info
writing src\gluonnlp.egg-info\PKG-INFO
writing dependency_links to src\gluonnlp.egg-info\dependency_links.txt
writing requirements to src\gluonnlp.egg-info\requires.txt
writing top-level names to src\gluonnlp.egg-info\top_level.txt
adding license file 'LICENSE' (matched pattern 'LICEN[CS]E*')
reading manifest file 'src\gluonnlp.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
building 'gluonnlp.data.fast_bert_tokenizer' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\sangw\appdata\local\programs\python\python38\python.exe' -
u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sangw\\AppData\\Local\\Temp\\pip-install-
dzxe39ek\\gluonnlp_15f32c5f94ee4ee2967910ed42542ce2\\setup.py'"'"'; __file__='"'"'C:\\Users\\sangw\\AppData\\Local\\
Temp\\pip-install-dzxe39ek\\gluonnlp_15f32c5f94ee4ee2967910ed42542ce2\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)
(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'
"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --
record 'C:\Users\sangw\AppData\Local\Temp\pip-record-44espqdv\install-record.txt' --single-version-externally-managed -
-compile --install-
headers 'c:\users\sangw\appdata\local\programs\python\python38\Include\gluonnlp' Check the logs for full command outp
ut.
WARNING: You are using pip version 21.1.1; however, version 22.3.1 is available.
You should consider upgrading via the 'c:\users\sangw\appdata\local\programs\python\python38\python.exe -
m pip install --upgrade pip' command.
원인
Microsoft C++ Build Tools 부재
해결 방법
https://visualstudio.microsoft.com/visual-cpp-build-tools/
여기로 가서 그냥 C++를 사용한 데스크톱 개발만 체크하고 다운받았다
용량이 매우 크니 주의하자
3. FileNotFoundError
오류 코드
FileNotFoundError: [Errno 2] No such file or directory: 'D:/22학년 2학기/챗봇/attiary-model-main/attiary-model-main/checkpoint/chatbot_kogpt2.ckpt'
원인
파일이 존재하지 않아서
해결 방법
해당 위치에 파일을 넣어주었다
4. UnicodeDecodeError
오류 코드
원인
cp949 코덱으로 인코딩 된 파일을 읽어들일 때 발생함
해결 방법
c_f = open(category_path, 'r', encoding='UTF8')
open관련 코드에 전부encoding='UTF8' 추가해서 해결
5. jsonify 한글 인코딩 오류
오류 코드
answer이 String으로 나와야 하는데 이상한 문자로 나온다
원인
기존 utf8 인코딩이 아닌, ascii 인코딩으로 출력되기 때문
해결 방법
app.py에
from flask import Flask, request, jsonify
app = Flask(__name__)
app.config['JSON_AS_ASCII'] = False
app.config['JSON_AS_ASCII'] = False 한 줄 추가
6. 안드로이드에서 flask api 호출 오류
오류 코드
D/CONNECTION FAILURE:: failed to connect to ~~ from ~~
상황
포스트맨으로는 정상적으로 리턴이 되는 상황
허나 안드로이드에서는 호출 오류가 됨
ip, url 전부 수정해봤지만 안 고쳐짐
원인
방화벽
해결 방법
방화벽 해제
'오류' 카테고리의 다른 글
졸작 오류-1 (1) | 2022.11.21 |
---|---|
구글 포토 삭제 복구 (0) | 2022.11.08 |
JAVA_HOME is set to an invalid directory 오류 (0) | 2022.06.29 |
파일이 너무 커서 대상 파일 시스템에서 사용할 수 없습니다 (0) | 2022.06.05 |
프로그래머스 복사 안될때 (0) | 2022.06.01 |
- Total
- Today
- Yesterday
- 인프콘2024
- javascript
- 데이터3법
- CSS
- authorization code
- 데이터베이스
- DDL
- 2024인프콘
- Android Studio
- 프로그래머스
- authorization_code
- SQL
- 클로아
- git 예전 커밋 수정
- DML
- html
- 로스트아크 캐릭터
- git
- infcon 2024
- html #웹 #웹사이트 #플레이리스트
- oauth
- 오픈소스
- 리눅스
- 데이터 3법
- bfs
- SpringBoot
- oauth2.0
- kloa
- git commit 수정
- 우분투
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |