This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: FatalError: initfsencoding python couldn't find codec Module not found: Encodings
Type: crash Stage: resolved
Components: Installation, Windows Versions: Python 3.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Lokesh Chandak, iritkatriel, methane, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2019-06-23 13:57 by Lokesh Chandak, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (7)
msg346322 - (view) Author: Lokesh Chandak (Lokesh Chandak) Date: 2019-06-23 13:57
I encountered this issue when using pip. Whenever I try to install a package, it shows a Fatal error, saying that the module encodings was not found, followed by a reboot.
The blue screen shows this message:
KMode exception not handled.
What failed: dipsp.sys.

I have tried uninstalling and reinstalling python 3.7.3. I have also tried moving back to Python 3.5, because I am certain that this issue didn't exist when I was using that. However I encountered the same issues again.

I can otherwise use the interpreter, and run all my code just fine. Previously installed modules like pandas and numpy also work like usual. The only difficulty I encountered is when attempting to install new packages using pip.

After looking around, I found something about setting PYTHONPATH and PYTHONHOME environment variables, but it didn't work either.
I tried installing python in different locations, but that didn't help either.

I am now stuck because I can't install any modules, (and I lost previously installed modules during clean reinstall).
How do I solve this? And while a solution is found, is there a way to install modules without pip?
msg346330 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2019-06-23 16:12
There may be a broken pip.exe in your computer.

Try `python -VV` to check what python are you using.
After that, try `python -m pip`, instead of `pip`.
msg346352 - (view) Author: Lokesh Chandak (Lokesh Chandak) Date: 2019-06-24 05:10
Thank Inada Naoki, I can confirm that python -m pip works as normal and I can resume my work.
However pip is still causing the errors, and not just pip, it was also the same for pip3 and pip3.7 as well as easy_install. I guess I will wait for future updates to solve this.
(Also, just one question: how could python -m pip work but not pip? What are the differences in them?
msg346353 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2019-06-24 05:19
You can use `where pip` to find which pip is used.
And you can check `PATH` environment variable and remove unused PATHs.
msg346415 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-06-24 15:28
> Also, just one question: how could python -m pip work but not pip? What are the differences in them?

To answer this, "pip" on its own is essentially like writing the full path to a specific python.exe and passing "-m pip". If that Python install has been removed or (more likely in this case) is broken, then you'll get the error you're seeing.

Fixing your PATH as suggested should do it.
msg377547 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2020-09-26 23:55
Is this issue resolved?
msg377548 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2020-09-26 23:55
Oh, it's closed, sorry for the noise.
History
Date User Action Args
2022-04-11 14:59:17adminsetgithub: 81559
2020-09-26 23:55:57iritkatrielsetmessages: + msg377548
2020-09-26 23:55:29iritkatrielsetnosy: + iritkatriel
messages: + msg377547
2019-06-24 15:28:27steve.dowersetmessages: + msg346415
2019-06-24 05:19:22methanesetstatus: open -> closed
resolution: not a bug
messages: + msg346353

stage: resolved
2019-06-24 05:10:21Lokesh Chandaksetmessages: + msg346352
2019-06-23 16:12:48methanesetnosy: + methane
messages: + msg346330
2019-06-23 13:57:39Lokesh Chandakcreate