안녕하세요. 카이랏입니다.
프로젝트를 진행하다보니 설치가 안되는 모듈이 있더라구요. 물론 https://pypi.org 에서 찾은 모듈이고 이를 pip3 를 이용하여 설치를 시도했지만 번번히 실패하였습니다.
해당 모듈의 이름은 "tweet-capture" 입니다. 본 모듈은 python 3.8, 3.9, 3.11 에서 모두 설치를 시도했지만 모두 동일한 구간에서 실패를 하였습니다. 그것은 다름 아닌 requirements.txt 파일을 찾는 곳이었습니다. 에러는 다음과 같습니다.
위의 문장을 잘 보시면 "requirements.txt" 파일을 찾고 있습니다. 그래서 소스코드를 다운받아 살펴봤는데 파일이 없었습니다. 그래서 수동으로 넣고 모듈을 수동으로 빌드하려고 합니다.
먼저 사이트에서 tar 파일을 다운로드 받습니다.
일단 받은 파일을 폴더에 풀고 터미널로 해당 폴더로 이동합니다. 필요한 파일은 requirements.txt 파일이므로 아래 명령을 수행하여 requirements.txt 파일을 만들도록 합니다.
pip3 freeze > requirements.txt
setup.py 파일과 같은 위치에 requirements.txt 파일이 생성되면 됩니다.
이후 아래 명령을 수행하여 모듈을 수동 설치하면 됩니다.
python setup.py install
이후로 정상설치 되는 것을 확인할 수 있습니다.
Hello. This is Kairat.
While working on a project, there was a module that could not be installed. Of course https://pypi.org is a module found in pip3 I tried to install using , but it failed every time.
The name of the module is "tweet-capture". I tried to install this module in python 3.8, 3.9, and 3.11, but all failed in the same section. That was the place to look for none other than the requirements.txt file. The error is:
If you look closely at the sentence above, you are looking for the "requirements.txt" file. So I downloaded the source code and looked at it, but there was no file. So manually input modules manually trying build.
Download the tar file from the site first.
Once you unpack the received file into a folder, move to that folder with Terminal. Since the required file is the requirements.txt file, execute the command below to create the requirements.txt file.
pip3 freeze > requirements.txt
Just create a requirements.txt file in the same location as the setup.py file.
After that, you can manually install the module by executing the command below.
python setup.py install
you can check that it is normally installed.
'Python > [Know How] 파이썬 공부' 카테고리의 다른 글
ChatGPT를 이용한 Python 딕셔너리 정렬 코드 (0) | 2023.04.22 |
---|---|
맥에서 python, pip 버전 변경하기 (0) | 2023.04.21 |