-
Notifications
You must be signed in to change notification settings - Fork 450
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
ModuleNotFoundError: No module named 'encodings' #976
Comments
@IAmOrion, As you saw, I had the same issue. My workaround is to: 1: UNINSTALL my current version of the library. This process has worked for me every time. Just updating a library used to work, but since about 2.6.1 this strange issue has appeared. I do not think I have updated the IDE version, so unclear why the issue has started. |
@revell1 Yes I saw your post about it, for me, on Windows 11 22H2, that didn't work. But as i say, using 2.6.1 works for me, and I don't think the changes affect my current projects so no big deal atm |
I am getting a similar error on a new computer with Windows 11 after moving my work from another computer. Again, version 2.6.1 works for me on Windows 11. |
What version of the Arduino IDE is in use here? When you manually download and unpack https://github.com/earlephilhower/pico-quick-toolchain/releases/download/1.0.1-base/python3-3.7.2.post1-embed-win32v2a.zip, and start the python interpreter therein ( |
I am using Arduino IDE 1.8.19 and I install the software through the boards manager process. I am currently using Arduino-Pico 2.6.1 without any problems. |
@maxgerhardt I too am using 1.8.19, I will check your linked download this week. As above though, 2.6.1 works perfectly |
I can't reproduce this in a Windows 11 VM directly from Microsoft.
and latest Arduino-Pico 2.6.3 installed via the board manager in Arduino IDE 1.8.19, downloaded in the .zip archive version, can compile sketches no problems.
|
Thanks @maxgerhardt for the assist! I am also unable to reproduce on a Win10 physical system, nor on a temp VM I threw together. @IAmOrion and @fletchjp if you could enable logging via |
I'm wondering if I have to go through a special sequence. The Windows 11 VM was fully windows-updated, but it was still downloaded some time ago and probably not what's not on https://developer.microsoft.com/de-de/windows/downloads/virtual-machines/ now. And I directly installed core 2.6.3, not 2.6.1 -> update to 2.6.3. I did however restart the Arduino IDE and compiled multiple times to make sure it would go through after program restarts. Curious what other's install procedure was so I can reproduce that more exactly. |
@earlephilhower I shall enable the logging tomorrow and report back. @maxgerhardt I had 2.6.1 installed (I do also have Python installed but thus far has never clashed or been an issue). I installed 1.8.19 via the exe/msi installer direct from Arduino.cc. I installed < 2.6.1 via the board manager. At some point I updated to 2.6.1 and all was well. I missed 2.6.2 purely because I didn't update the board when prompted. I then started a new RP2040 project, and the board update was at 2.6.3, so I updated via board manager. Kept getting the error mentioned, so I reverted back to 2.6.1 (again, skipping 2.6.2, purely because I knew 2.6.1 worked perfectly and I needed to compile and test stuff). I have been using 2.6.1 since perfectly fine. As mentioned I will enable logging and update to get more details on the error |
Is that the Windows Store version of Python or from https://www.python.org/downloads/windows/? Which version exactly? |
Earle, I have just seen this message, I have just shut down the computer where I have the problem and I won't be able to get to this for a bit - I am a Warley MRC member and involved with the Model Railway Show this weekend. |
Earle I have come to the conclusion that the problem is not in either version 2.6.1. or 2.6.3. The problem is in the update process. I have experienced the problem upgrading from 2.6.1 to 2.6.3 and downgrading back to 2.6.1. The error message about encodings was the same with both operations, In each case the solution was to delete arduino-pico and do a reinstall of the required version. I can then successfully compile. I hope this helps. John |
Here is some more information about the upgrade problem in a file I don’t know what this means. The boards are not installed. |
@fletchjp , looks like the Arduino IDE has a problem installing the core on your system for some reason and that might be enough to cause your failure (i.e. the Python extraction fails, causing the Python3.exe file to fail on startup with missing libraries). Under Windows I've seen things like this with certain AntiVirus SW/anti-malware blockers where the scanner blocks creation of certain (legal, safe) filetypes because of the way it's running. But in any case, it seems there's nothing wrong with the archive or the core here but with either the Windows IDE or unpacker which we don't have control over. :( I would suggest you try the "uninstall, reinstall later version" option that was mentioned as working above. |
Earle Thank you for this. My system is a fairly new Windows 11 setup where I am gradually installing new software. I have recently started to use the arduino-cli software which I had not used before. It was not running when I did these update experiments. I will have to be careful when I am next offered an update to Arduino-pico. I am glad there is nothing wrong with your system. Best wishes John |
Uninstall / Reinstall didn't work for me - 2.6.3 still errors. Here's the full error message log - verbose output on compile is enabled
|
And it doesn't matter if your sketch is saved on the |
Correct. I tried compiling from C: drive also, same error. Just to re-iterate, v2.6.1 works perfectly using X: drive Edit: just to add, NO python variables in my Environment Variables
Yes, installer version direct from python website
No, nothing in my environment variables related to Python
EXE version downloaded direct from Arduino
British English |
Can you open a commandline (Win+R ->
and if Python starts up correctly, execute Does it show any error? What happens when you open another terminal, execute |
Okay, that narrows it down further so the Python interpreter, and not to the Close the Arduino IDE, execute
then delete all files inside it, then download the Python version referenced in #976 (comment), extract it in the folder so that it has the same filestructure as before. Does startup still fail? |
So, that tells me that the problem is with the included Python as installed via the board manager - ? Compilation DOES now SUCCEED! |
Wow so the Arduino IDE did not properly unpack the entire Python package.. because.. weirdness o_O?
So the entire |
Yes correct
It would appear so - also appears to be specific to 2.6.3 for multiple people |
I guess this issue can be closed then as it's not an issue with this, but an issue with the Arduino IDE -- at least we know why now :) |
This is now tracked in arduino/Arduino#11842. |
Same issue with 3.5.0, same solution: |
I really think the issue is not with a particular version like "3.5.0", but the update process in the Arduino IDE itself. This will appear when updating to older and newer Arduino-Pico core versions alike. The best solution is to not handpick the missing files, but do a clean remove -> reinstall of the core. |
Remove-reinstall did not help. That was what I have tried first. |
Was removal done by removing the |
I just experienced the same issue, it took the following steps to clear it. Uninstall the Raspberry PI Pico/RP2040 board. That appeared to finish without problems. I then exited the IDE. I then navigated to C:\Users\David\AppData\Local\Arduino15\packages and tried to delete the rp2040 folder. Most of it went away, but the folder holding the local copy of Python did not, claiming the files contained in it were open in Python. A brief search with Sysinternals Process Explorer found an orphaned Python.exe running, that had file handles open for the files in question. I was able to terminate the Python.exe with the local equivalent of a swift "kill -9", and sure enough, I could then delete the last remnants of the rp2040 folder. Fire up Arduino IDE again, install the RP2040 board, and it's all love, peace, happiness, unicorns and rainbows. TL;DR if you're trying to do an uninstall / reinstall to fix this, closing the IDE may not be enough. You may have to hunt for a rogue Python.exe that's still running and terminate it to ensure you can fully delete the rp2040 folder. |
I also experienced the same problem. |
Just (re)installed this onto my Windows machine. Latest v2.6.3.
No matter what board I choose, I always get the following Python error
Edit: Downgrading to 2.6.1 'fixes it' and works
The text was updated successfully, but these errors were encountered: