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

PYTHONPATH not seen by Spyder after updating to 5.3.3? #19724

Closed
mmagnuski opened this issue Oct 6, 2022 · 4 comments
Closed

PYTHONPATH not seen by Spyder after updating to 5.3.3? #19724

mmagnuski opened this issue Oct 6, 2022 · 4 comments

Comments

@mmagnuski
Copy link

Hi,

I've just updated Spyder to version 5.3.3 (I had 5.0.something previously IIRC). Now packages that I had accessible via PYTHONPATH in Spyder previously are no longer found (importing them fails). The PYTHONPATH contents are seen from the console that I start Spyder from (echo %PYTHONPATH% lists the contents correctly), but os.environ['PYTHONPATH'] in Spyder console gives KeyError: 'PYTHONPATH'. This happens in the first console I have in Spyder, but the problem persists after restarting the console or opening another one.
I can add the paths I need to sys.path of course, but it would be nice if that worked like it used to. Maybe this is related to #19194?

@mmagnuski
Copy link
Author

Ok, I noticed now that under Tools there is PYTHONPATH manager, where I can import paths. I think it would be nice if either PYTHONPATH was imported by default the first time Spyder is run, or if there was some kind of information that the way PYTHONPATH is handled has changed.

@dalthviz
Copy link
Member

Hi @mmagnuski thank you for the feedback! I think this is related with #18942

Pinging @ccordoba12 and @mrclary since them could give a little more insight about the plan for the PYTHONPATH handling for the next release (5.4.0) and in the general future

@mrclary
Copy link
Contributor

mrclary commented Oct 12, 2022

@mmagnuski and @dalthviz, this is not related to #18942 (which was not reproducible) but is related to #19194, as @mmagnuski supposed.

@ccordoba12 was planning to close #19194 and open a different PR after our discussion about this issue (I think we have notes on HackMD). The bottom line is that PYTHONPATH will be imported by default. We'd have to follow up with @ccordoba12 to see if that will make it into 5.4.0, but I think the plan was that it would.

@ccordoba12
Copy link
Member

We'd have to follow up with @ccordoba12 to see if that will make it into 5.4.0, but I think the plan was that it would.

Yeah, I'm planning to work on that during the weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants