AI/NLP

kakaobrain/pororo install in conda

Visioneer 2024. 3. 20. 00:23

kakaobrain/pororo

 

# pytorch 1.6이 무조건 선행되어야함. python은 3.6
conda create -n test python=3.6
conda install pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=10.1 -c pytorch

# pororo git
git clone https://github.com/kakaobrain/pororo.git
ls
cd pororo
pip install -e .

 

필자는 pip install -e . 를 했더니 아래와 같은 오류가 발생하며 실행되지 않았다.

 

ERROR: Command errored out with exit status 1:
     command: 'C:\Users\SangHyuk\.conda\envs\test\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\SangHyuk\\Desktop\\data\\pororo\\setup.py'"'"'; __file__='"'"'C:\\Users\\SangHyuk\\Desktop\\data\\pororo\\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'"'"'))' egg_info --egg-base 'C:\Users\SangHyuk\AppData\Local\Temp\pip-pip-egg-info-6tmgpwy4'
         cwd: C:\Users\SangHyuk\Desktop\data\pororo\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\SangHyuk\Desktop\data\pororo\setup.py", line 33, in <module>
        long_description=open("README.md").read(),
    UnicodeDecodeError: 'cp949' codec can't decode byte 0xed in position 4914: illegal multibyte sequence
    ----------------------------------------
WARNING: Discarding file:///C:/Users/SangHyuk/Desktop/data/pororo. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

 

README.md 파일이 encoding 문제로 열리지 않는다고 한다. 

따라서 setup.py에 들어가서  README.md를 열 때, encoding을 utf-8로 하도록 수정한다.  

# 이 코드
long_description=open("README.md").read(),

# 다음과 같이 변경
long_description=open("README.md", encoding='utf-8').read(),

 

그리고 나서 pip install -e . 을 다시 실행하면 문제 없이 잘 설치됨을 확인 할 수 있다.

'AI > NLP' 카테고리의 다른 글

Evaluation Metric  (0) 2024.04.16
Query-Document Relevance  (0) 2024.04.16
역색인과 형태소 분석기  (0) 2024.04.16