티스토리 뷰

728x90

https://stackoverflow.com/questions/5875810/importerror-when-trying-to-import-a-custom-module-in-python

 

ImportError when trying to import a custom module in Python

Note that I searched SO for this error and while there were many similar questions, I didn't find one that addressed this particular issue. I'm working on a Python module that looks like this: /c...

stackoverflow.com

user@host:~$ PYTHONPATH=/path/to/whatever python some_file.py

export PYTHONPATH=/path/to/whatever

import sys
sys.path.append('/path/to/whatever')
728x90

'공부' 카테고리의 다른 글

Python - What is a lazy property?  (0) 2021.05.19
Add directory to Python path in PyCharm?  (0) 2021.05.19
[hive] 트랜잭션(Transactional, ACID) 테이블  (0) 2021.05.19
[Python] find, index, rfind, rindex  (0) 2021.05.06
[Hadoop] basic  (0) 2021.04.28
댓글
댓글쓰기 폼