adafruit / Adafruit_Blinka

Add CircuitPython hardware API and libraries to MicroPython & CPython devices
https://learn.adafruit.com/circuitpython-on-raspberrypi-linux
MIT License
438 stars 328 forks source link

Adafruit-PlatformDetect version 3.60.0 was unable to identify the board #787

Closed DorCa77 closed 4 months ago

DorCa77 commented 4 months ago

Dear all,

Adafruit-PlatformDetect version 3.60.0 was unable to identify the board and/or microcontroller running the Darwin platform. Please be sure you have the latest packages by running: 'pip3 install --upgrade adafruit-blinka adafruit-platformdetect'

Ok, I ran 'pip3 install --upgrade adafruit-blinka adafruit-platformdetect', but I still get the same message in RStudio.

    If you are running the latest package, your board may not yet be supported. Please
    open a New Issue on GitHub at https://github.com/adafruit/Adafruit_Blinka/issues and
    select New Board Request.

Best regards

mrdrdemmy commented 4 months ago

Same deal here (yes, latest package is reported to have been installed). At the Python prompt:

>>> import board Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\xyz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\board.py", line 387, in <module> raise NotImplementedError( NotImplementedError: Adafruit-PlatformDetect version 3.60.0 was unable to identify the board and/or microcontroller running the Windows platform. Please be sure you have the latest packages by running: 'pip3 install --upgrade adafruit-blinka adafruit-platformdetect'

I am not sure what is being looked for here. The desktop machine is a year-old Dell Vostro, running an up-to-date Windows 11. A mcp2221a breakout is connected, and looks fine in device manager. What's up?

EDIT (per dhalbert, below): I am using the latest VS Code and build tools, and followed the instructions at https://learn.adafruit.com/circuitpython-libraries-on-any-computer-with-mcp2221.

raku9cam commented 4 months ago

I had the same problem, but changing the Python version from 3.10 to 3.9 fixed it.

mrdrdemmy commented 4 months ago

I have version 3.11.6 installed, and bristle at being compelled to roll back just to address an otherwise obscure issue. I will give it a shot, though, and see whether it was worth the effort. Thanks for the tip!

mrdrdemmy commented 4 months ago

Well, that was easy. On a whim, I moved up to 3.12.2, instead of down to 3.9, and the blinka install worked after that. Thanks again for the versioning tip!

mrdrdemmy commented 4 months ago

Whoops. Upgrading to 3,12,2 DID NOT fix the problem; import board continues to yield the same error as above. Python.org no longer offers an installer for version 3.9, so I will be putting this little project aside pending more ideas. Too bad, since the mcp2221 breakout would have been pretty handy.

Apologies, if I led anyone astray with my previous comment!

dhalbert commented 4 months ago

@makermelissa This appears to be failing with Python 3.12 on Windows and macOS, even with the MCP2221 env var set?

dhalbert commented 4 months ago

@mrdrdemmy and @raku9cam Please edit your posts above to make clear exactly what platform you are running on, if you've set any environment variables for an MCP2221, etc., and how you're setting them. Someone was trying to set the variable in a VScode terminal window, for instance, and that did not seem to work.

mrdrdemmy commented 4 months ago

I did set BLINKA_MCP2221=1 in the VS Code terminal. It's interesting to learn about the potential VS Code issue, though I haven't noticed trouble setting environment variables there before (e.g., when wrestling with the pico pi sdk install). I'll try setting it outside of VS Code when I get a chance. Thank you.

mrdrdemmy commented 4 months ago

per dhalbert, above: "Someone was trying to set the variable in a VScode terminal window, for instance, and that did not seem to work."

YES! Adding BLINKA_MCP2221 to my local environment outside of VS Code worked. I guess that'll have to go in my start-up script now.

Thank you for your help.

dhalbert commented 4 months ago

@caternuson of interest to you

dhalbert commented 4 months ago

@mrdrdemmy Note that the Terminal window in VSCode is PowerShell, by default, so you need to use $env:BLINKA_MCP2221=1, not set BLINKA_MCP2221=1. I have added a note to the Guide about this.

mrdrdemmy commented 4 months ago

@mrdrdemmy Note that the Terminal window in VSCode is PowerShell, by default, so you need to use $env:BLINKA_MCP2221=1, not set BLINKA_MCP2221=1. I have added a note to the Guide about this.

Ah. Good catch! Thank you very much.

Ney1ro commented 2 months ago

### у меня пайчарм и выходит ошибка If you are running the latest package, your board may not yet be supported. Please open a New Issue on GitHub at https://github.com/adafruit/Adafruit_Blinka/issues and select New Board Request.