https://replit.com/@mblakele/bugimportd ... mpsобразно Команда, которую я не просил: < /p>
Код: Выделить всё
--> poetry add decouple humps
Using version ^0.0.7 for decouple
Using version ^0.2.2 for humps
Updating dependencies
Resolving dependencies...
Package operations: 2 installs, 0 updates, 0 removals
• Installing decouple (0.0.7)
• Installing humps (0.2.2)
Writing lock file
Код: Выделить всё
[tool.poetry.dependencies]
pyhumps = "3.8.*"
python-decouple = "^3.6.0"
Traceback (most recent call last):
File "/home/runner/BugImportDecoupleHumps/main.py", line 2, in
from decouple import config
ImportError: cannot import name 'config' from 'decouple' (/home/runner/BugImportDecoupleHumps/.pythonlibs/lib/python3.11/site-packages/decouple/__init__.py)
< /code>
После каждой попытки я должен удалить посторонние линии из моего Toml, а также использовать PIP или UPM, чтобы удалить поддельные пакеты. Если я сделаю это, запуск кода из Shell работает OK: < /p>
~/BugImportDecoupleHumps$ pip uninstall decouple humps
Found existing installation: decouple 0.0.7
Uninstalling decouple-0.0.7:
Would remove:
/home/runner/BugImportDecoupleHumps/.pythonlibs/lib/python3.11/site-packages/decouple-0.0.7.dist-info/*
/home/runner/BugImportDecoupleHumps/.pythonlibs/lib/python3.11/site-packages/decouple/*
Proceed (Y/n)?
Successfully uninstalled decouple-0.0.7
Found existing installation: humps 0.2.2
Uninstalling humps-0.2.2:
Would remove:
/home/runner/BugImportDecoupleHumps/.pythonlibs/lib/python3.11/site-packages/humps-0.2.2.dist-info/*
/home/runner/BugImportDecoupleHumps/.pythonlibs/lib/python3.11/site-packages/humps/*
/home/runner/BugImportDecoupleHumps/.pythonlibs/lib/python3.11/site-packages/tests/*
Would not remove (might be manually added):
/home/runner/BugImportDecoupleHumps/.pythonlibs/lib/python3.11/site-packages/humps/__init__.pyi
/home/runner/BugImportDecoupleHumps/.pythonlibs/lib/python3.11/site-packages/humps/main.py
/home/runner/BugImportDecoupleHumps/.pythonlibs/lib/python3.11/site-packages/humps/main.pyi
/home/runner/BugImportDecoupleHumps/.pythonlibs/lib/python3.11/site-packages/humps/py.typed
Proceed (Y/n)?
Successfully uninstalled humps-0.2.2
~/BugImportDecoupleHumps$ python main.py
hello False
< /code>
Как это исправить? Могу ли я остановить применение от угадывания этих пакетов?
Заранее спасибо за помощь!
Подробнее здесь: https://stackoverflow.com/questions/791 ... my-project