currencyconverter
-
개요aws CloudShell에서 python 파일을 실행하던 중 해당 오류를 만났다.Traceback (most recent call last): File "/home/cloudshell-user/discord-cost-bot/cost_send.py", line 4, in from currency_converter import CurrencyConverterModuleNotFoundError: No module named 'currency_converter'해결방법CurrencyConverter 라이브러리 설치우선 CurrencyConverter 라이브러리를 설치하지 않았다면 설치를 진행하자.pip install CurrencyConverter하지만 정상적으로 라이브러리를 설치했음에도 똑같은 ..
Python - No module named 'currency_converter' error개요aws CloudShell에서 python 파일을 실행하던 중 해당 오류를 만났다.Traceback (most recent call last): File "/home/cloudshell-user/discord-cost-bot/cost_send.py", line 4, in from currency_converter import CurrencyConverterModuleNotFoundError: No module named 'currency_converter'해결방법CurrencyConverter 라이브러리 설치우선 CurrencyConverter 라이브러리를 설치하지 않았다면 설치를 진행하자.pip install CurrencyConverter하지만 정상적으로 라이브러리를 설치했음에도 똑같은 ..
2024.07.31 -
개요aws 비용 발송 discord 봇을 만들던 중 한화로 변환해서 보여주면 좋겠다는 생각이 들어 만들어보았다.코드# 환율 변환 라이브러리from currency_converter import CurrencyConverter# 환율 데이터 zip 파일을 반환해주는 europa.eu 사이트 urlurl = 'https://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist.zip'# 환율 변환 클래스 인스턴스 생성, 유로화 환율 데이터를 제공하는 zip 파일을 사용하여 초기화c_list = CurrencyConverter(url)# 1달러를 한화로 변환한 결과 출력print(c_list.convert(1, 'USD','KRW'))
Python - 달러 환율 계산개요aws 비용 발송 discord 봇을 만들던 중 한화로 변환해서 보여주면 좋겠다는 생각이 들어 만들어보았다.코드# 환율 변환 라이브러리from currency_converter import CurrencyConverter# 환율 데이터 zip 파일을 반환해주는 europa.eu 사이트 urlurl = 'https://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist.zip'# 환율 변환 클래스 인스턴스 생성, 유로화 환율 데이터를 제공하는 zip 파일을 사용하여 초기화c_list = CurrencyConverter(url)# 1달러를 한화로 변환한 결과 출력print(c_list.convert(1, 'USD','KRW'))
2024.07.31