Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anaconda ignores PYTHONPATH var #937

Open
Foxtrod89 opened this issue Aug 21, 2023 · 0 comments
Open

Anaconda ignores PYTHONPATH var #937

Foxtrod89 opened this issue Aug 21, 2023 · 0 comments

Comments

@Foxtrod89
Copy link

Foxtrod89 commented Aug 21, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant