Windows Python compatibility: Python from Microsoft Store works with Positron; in my experience Python from Python.org does not #4801
Replies: 2 comments 2 replies
-
PREMATURE OPTIMISM
However, if I import a "built-in" module such as "sys" it works, which is fortunate
One of the sources for Python's "sys.path" is an (operating system) environmental variable name "PYTHONPATH". I checked and "PYTHONPATH" was not set on my system. Because VS Code's console had a particularly long and thorough "sys.path" Using (and modifying) instructions from TutorialsPoint. I specifically used (and modified) the instructions for EXCEPT because the output is comma-delimited within brackets ['',] and the environmental paths
Then in the "Windows Environmental Variables dialog" I cut and pasted the resulting string Then I checked to make sure the PYTHONPATH was actually set
Yes, I forgot you don't "print" environmental variables, you "echo" them, ALMOST WORKED
But, when I tried to import pandas, I was still stuck.
Any suggestions? |
Beta Was this translation helpful? Give feedback.
-
Thanks for reporting this experience. We've had other folks be successful with Python installed from the official sources -- if it's still busted for you in some way, could you follow up here and/or open an issue? If you use multiple versions of Python, |
Beta Was this translation helpful? Give feedback.
-
In MS Windows 10 on Intel, among other changes, I updated my version of Python using an .exe downloaded from Python.org and later found that Positron timed out with the Python kernel and complained about not being able to import packages from "ipkernel".
When I uninstalled the Python Loader and Python itself (using "Apps" in "Windows Settings") and then reinstalled Python from Microsoft Store Positron worked again!
Positron notified me it needed to install ipkernel, which I agreed to and now Positron seems to be working fine.
I had also uninstalled Positron 2024.09.0-45 and installed Positron 2024.09.0-77, not certain, but I believe it was the Microsoft Store version of Python that made the difference. I had lost 3 days of productivity (unfortunately Positron is beta software) and my error report on Github appended to a similar complaint about the R interpreter had been marked as "off topic" (so, yes I did do a search for similar discussions and my comment was marked off-topic), so by that point I was in an uninstall-reinstall fury and did not do systematic testing. That's my experience this time, your experience may be different and my experience may be different next time.
From Positron console:
Beta Was this translation helpful? Give feedback.
All reactions