I use Platformio to update Marlin on my 3D printer. 2 weeks ago it worked perfectly and today I changed a Marlin parameter and when compiling I get this error:
ModuleNotFoundError: No module named 'platformio.managers.package':
File "C:\users\oscar\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 167:
File "C:\Users\Oscar\.platformio\packages\tool-scons\script\..\engine\SCons\Script\SConscript.py", line 597:
return _SConscript(self.fs, *files, **subst_kw)
File "C:\Users\Oscar\.platformio\packages\tool-scons\script\..\engine\SCons\Script\SConscript.py", line 286:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "D:\Oscar\Impresion 3D\Marlin\Marlin-2.0.6\Marlin 2.0.6 MKS Robin-V6-BMG\buildroot\share\PlatformIO\scripts\common-dependencies.py", line 12:
from platformio.managers.package import PackageManager
Help me please
Maybe related to ImportError: No module named *** · Issue #1787 · platformio/platformio-vscode-ide · GitHub?
Have you tried updating your PlatformIO installation (
pio upgrade --dev) or reinstalling it completely (deleting
C:\Users\<users>\.platformio completely, too)?
I have updated Platformio and I keep getting the same error, can’t import PackageManager.
But the weird thing is that other Marlin compilations and other projects with ESP8266 and Arduido compile fine.
That’s why installing everything I don’t know if it will be the solution
Help me please
I ran into this exact error - turns out the problem is you need to update the Marlin source code. Doing a git pull on the branch to get the latest fixed the problem, reinstalling platformio did not. The problem is your platformio has updated at some point, but the Marlin code is using an older API.
It seems that the
platformio.managers.package was removed - or at least trying to do
import platformio works,
import platformio.managers works, and
import platformio.managers.package gives the error.
what would you git pull, and how can it be done?
A quick workaround is to take
buildroot from a newer Marlin and replace the one in your project
Worked like a charm! Thank you!
Thank you all.
Possibly a bug in the Marlin version, but I see that Windows 10 has something to do with the problem. I have solved it by installing the Ubuntu subsystem on Windows 10 and compiling the same code but with platformio on Linux Ubuntu.
Follow the directions in this video: - YouTube
It is a problem with Marlin 2.6.0 since when updating Platformio to version 5 it gives the same error when compiling in linux as in Windows 10. I will test Marlin 2.6.1 to see if it works well and this incompatibility is solved.
You can always tell VSCode to not use its builtin core version but the global one instead that you install via
pip in the extension settings. Then using pip, you can always uninstall PIO and install a specific version of PIO 4. See platformio · PyPI and python - Installing specific package version with pip - Stack Overflow.
I asked this question in other topic.
Is there anything else that has to be changed in new configuration.h ?
After update I experience problem with RE-ARM board. Now when I upload firmware and connect re-arm to computer it doesn’t recognize SD card anymore and loses USB connection after couple of minutes.
With version 188.8.131.52 of Marlin it compiles perfectly in Windows 10.
Thank you all for the help
I have no knowledge of that plate but I give some tips if they help you:
- Format SD in FAT32.
- Find the appropriate configuration for your board of these parameters in configuration.h
#define SERIAL_PORT -1 // MKS Robin E3
#define SERIAL_PORT_2 1 // MKS Robin E3
To avoid conflicts between SD USB …
The values that I give you are those of my board.
I am having this issue with the 184.108.40.206 Marlin build for the board, This is my first time working with updating the firm ware and Im not sure what is going wrong.
This totally solved the issue.
I’m using Github Desktop and merged upstream into my branch, so Marlin (bugfix-2.0.x) should be updated with the latest updates as of just a few minutes ago. I’ve also tried to download both stable and bugfix from Github to my local machine and copied buildroot manually, but I still have the same error, except my missing module is ‘elftools’. I’m running PlatformIO 5.0.3. VSCode is also updated (v1.51.1). Any idea how to fix this?