Skip to content

mip: Dependency of copy not installed #679

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

Closed
sandyscott opened this issue Jun 13, 2023 · 3 comments · Fixed by #680
Closed

mip: Dependency of copy not installed #679

sandyscott opened this issue Jun 13, 2023 · 3 comments · Fixed by #680

Comments

@sandyscott
Copy link

When I installed the copy package via mip (on attached host PC, not running on the device), the dependecy types was not installed.

To Reproduce:

Raspberry Pi Pico running v1.20.0
PC running Python 3.10, pip 3.10, mpremote 1.20.0

$ mpremote connect com14 mip install copy
Install copy
Installing copy (latest) from https://micropython.org/pi/v2 to /lib
Installing: /lib/copy.mpy
Done
$ mpremote repl
Connected to MicroPython at COM14
Use Ctrl-] or Ctrl-x to exit this shell
>>> import copy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "copy.py", line 51, in <module>
ImportError: no module named 'types'
>>>
@andrewleech
Copy link
Contributor

Thanks for the report, it seems the dependency on types hasn't been declared in the manifest https://github.com/micropython/micropython-lib/blob/master/python-stdlib/copy/manifest.py

These manifests were automatically generated from the earlier setup.py based installer system which was pretty inconsistent in quality, so it's not surprising that some things like this have been missed

@sandyscott
Copy link
Author

It sounds like you've found the root cause of that issue, but there's also a problem with the types package:
(I wrote this comment almost immediately after posting the issue, but for some reason hadn't submitted it)

$ mpremote connect com14 mip install types
Install types
Installing types (latest) from https://micropython.org/pi/v2 to /lib
Package may be partially installed
mpremote: Package not found: https://micropython.org/pi/v2/package/6/types/latest.json
$ mpremote repl                           
Connected to MicroPython at COM14
Use Ctrl-] or Ctrl-x to exit this shell
>>> import copy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "copy.py", line 51, in <module>
ImportError: no module named 'types'
>>>

@andrewleech
Copy link
Contributor

Yes I added an extra comment to this PR referring to a proposed fix to the types package I submitted previously in PR #646

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants