ModuleNotFoundError: No module named 'importlib.metadata' 个人的情况: python3.7 conda 环境中安装了importlib-meta的工具包,版本为6.7.0 在引入的过程中,还是出现了问题。 这是由于,包的引入方式和包名不一致引起的。具体如下 # 系统的引入方式 from importlib.metadata import version, PackageNotFoundError #...
但是说明一点,使用pip安装肯定是各种麻烦,所以,直接使用【anaconda】进行安装就好了。
Installing collected packages: distlib, six, filelock, appdirs, zipp, importlib-metadata, virtualenv Running setup.py install for distlib … done Successfully installed appdirs-1.4.3 distlib-0.3.0 filelock-3.0.12 importlib-metadata-1.5.0 six-1.14.0 virtualenv-20.0.13 zipp-3.1.0 1. 2. 3. 4....
from importlib.metadata import distribution except ImportError: try: from importlib_metadata import distribution except ImportError: from pkg_resources import load_entry_point def importlib_load_entry_point(spec, group, name): dist_name, _, _ = spec.partition('==') matches = ( entry_point for ...
"importlib-metadata": { "hashes": [ "sha256:057e92c15bc8d9e8109738a48db0ccb31b4d9d5cfbee5a8670879a30be66304b", "sha256:b7e52a1f8dec14a75ea73e0891f3060099ca1d8e6a462a4dff11c3e119ea1b31" ], "markers": "python_version < '3.8' and python_version < '3.8'"...
ImportError: cannot import name 'metadata' from 'importlib' (/usr/local/lib/python3.7/importlib/__init__.py)ModuleNotFoundError: No module named 'importlib_metadata' Full Stack trace: Traceback (most recent call last):File "/venv/tap-powerbi-metadata/lib/python3.7/site-packages/singer_sdk/...
File"<frozen importlib._bootstrap>", line 991,in_find_and_load File"<frozen importlib._bootstrap>", line 973,in_find_and_load_unlocked ModuleNotFoundError: No module named'openpyxl' During handling of the above exception, another exception occurred: ...
except ImportError:try:from importlib_metadataimportdistribution except ImportError:from pkg_resourcesimportload_entry_point defimportlib_load_entry_point(spec,group,name):dist_name,_,_=spec.partition('==')matches=(entry_pointforentry_pointindistribution(dist_name).entry_pointsifentry_point.group==grou...
from importlib.metadata import distributionexcept ImportError:try:from importlib_metadata import distributionexcept ImportError:from pkg_resources import load_entry_pointdef importlib_load_entry_point(spec, group, name):dist_name, _, _ = spec.partition('==')matches = (entry_pointfor entry_point in...
importlib-metadata==6.8.0 importlib-resources==5.9.0 Jinja2==3.1.2 mac-alias==2.2.2 markdown-it-py==3.0.0 MarkupSafe==2.1.3 mdurl==0.1.2 packaging==23.2 platformdirs==3.11.0 psutil==5.9.5 Pygments==2.16.1 pyproject_hooks==1.0.0 python-dateutil==2.8.2 python-slugify==8.0.1 Py...