일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- SQL
- Google Excel
- Mac
- PANDAS
- Google Spreadsheet
- dataframe
- Redshift
- Github
- c#
- 파이썬
- Apache
- Excel
- hive
- google apps script
- django
- PySpark
- math
- numpy
- matplotlib
- GIT
- PostgreSQL
- string
- array
- list
- Python
- Java
- gas
- Tkinter
- Kotlin
- Today
- Total
목록PYTHONPATH (3)
달나라 노트

PyCharm을 사용하다보면 여러개의 Interpreter를 설정해서 사용하는 경우가 많고, 이와 동시에 스스로 만들어둔 custom library를 import해야하는 경우가 있습니다. PYTHONPATH와 환경변수 관련 내용은 아래 글을 참고하면 좋습니다. https://cosmosproject.tistory.com/386 Python Basic : PYTHONPATH (python module 설치 경로, python library 탐색 경로 추가하기, custom library import, sys.pa PYTHONPATH 환경변수에 대해 알기 전에 먼저 python library가 어떤 식으로 탐색되어 import되는지에 대한 기본적인 흐름을 천천히 살펴보고 갑시다. Python을 사용하다보면 ..
Python library중 하나인 sys의 path는 환경 변수(PYTHONPATH)의 list를 출력해줍니다. import sys print(sys.path) -- Result [ '/Users/Documents/Code', '/Users/Documents/Code/temporary', '/Users/.conda/envs/customs', '/Users/.conda/envs/customs/lib/python3.8', '/Users/.conda/envs/customs/lib/python3.8/lib-dynload', '/Users/.conda/envs/customs/lib/python3.8/site-packages' ] sys.path를 이용해서 그 내용을 출력해보면 위같이 여러 경로가 list에 담긴..

PYTHONPATH 환경변수에 대해 알기 전에 먼저 python library가 어떤 식으로 탐색되어 import되는지에 대한 기본적인 흐름을 천천히 살펴보고 갑시다. Python을 사용하다보면 아래와 같이 module(library)을 설치하고 import하는 과정을 많이 거치게 됩니다. pip install pandas pip install os conda install datetime import pandas as pd import os from datetime import datetime 우리는 terminal에서 pip 구문을 이용해 여러 module들을 간단하게 설치하고 사용할 수 있죠. 근데 한가지 궁금한게 생겼습니다. module을 설치한다고 했는데 그러면 이 module은 어디에 설치된걸..