mirror of
https://github.com/deepseek-ai/DeepSeek-VL.git
synced 2026-11-05 00:47:24 +00:00
[GH-ISSUE #4] ImportError: cannot import name 'Mapping' from 'collections' #1
Labels
No labels
enhancement
environment
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepSeek-VL#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @NickLucche on GitHub (Mar 11, 2024).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-VL/issues/4
Hey, thanks a lot for sharing this great accomplishment with the community!
I have just tried running the
cli_chaton Python3.11 and I getImportError: cannot import name 'Mapping' from 'collections'at https://github.com/deepseek-ai/DeepSeek-VL/blob/main/deepseek_vl/models/modeling_vlm.py#L21.I believe this is due to attrdict being broken with python3.10+ https://stackoverflow.com/questions/72361026/how-can-i-get-attrdict-module-working-in-python.
Easiest thing would be to update Readme/requirements to specify >=python3.8, <3.10.
@Fodark commented on GitHub (Mar 11, 2024):
I solved it by patching collections before loading
deepseek_vlSomething like:
if you want to stay on Python 3.10.
@insightbuilder commented on GitHub (Mar 12, 2024):
I did a bit of hardway... went to each of the files in the lib folders and moded it...
After doing it, came for posting the solution to find that, there is a smarter solution. Thanks to Fodark.
@Fodark commented on GitHub (Mar 14, 2024):
Fixed in #21