anaconda
anaconda copied to clipboard
Anaconda ignores PYTHONPATH var
Expected Behaviour
import module from parent dirs
Actual Behaviour
unable to import modules from parent dirs
from twsc.items import * #file test_spider.py located in subdir spiders unable to locate items.py from parent directory twsc. To fix this behavior we need to export root dir as $PYTHONPATH. Anaconda ignores PYTHONPATH
Steps to Reproduce
my project's structure ├── csv_item_exporter.py ├── scrapy.cfg ├── test.txt ├── twsc │ ├── init.py │ ├── items.py │ ├── middlewares.py │ ├── pipelines.py │ ├── settings.py │ └── spiders │ ├── init.py │ └── test_spider.py └── zip.txt
ST3, Anaconda and OS versions
Sublime 4 4122, macOS 11.6 Big Sur, Anaconda 2.3.0
ST3 Console Logs
ModuleNotFoundError: No module named 'twsc'
Anaconda's JsonServer Logs
Note: Anaconda's JsonServer logs can be found in:
- Linux: ~/.local/share/anaconda/logs
- OS X: ~/Library/Logs/anaconda
- Windows: %APPDATA\Anaconda\Logs