Skip to content
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

ModuleNotFoundError: No module named 'pkg_resources' #1724

Closed
ivan-toriya opened this issue Oct 17, 2024 · 5 comments
Closed

ModuleNotFoundError: No module named 'pkg_resources' #1724

ivan-toriya opened this issue Oct 17, 2024 · 5 comments
Labels
Bug Something isn't working Triage 👀

Comments

@ivan-toriya
Copy link
Contributor

ivan-toriya commented Oct 17, 2024

Describe the bug
After clean install, run
edr --help
Output:

Traceback (most recent call last):
  File "/home/ivan/edr-bug/.venv/bin/edr", line 5, in <module>
    from elementary.cli.cli import cli
  File "/home/ivan/edr-bug/.venv/lib/python3.12/site-packages/elementary/cli/cli.py", line 5, in <module>
    from pyfiglet import Figlet
  File "/home/ivan/edr-bug/.venv/lib/python3.12/site-packages/pyfiglet/__init__.py", line 11, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

To Reproduce

python --version
3.12.7
mkdir edr-bug
cd edr-bug
python -m venv .venv
source .venv/bin/activate
pip install elementary-data==0.16.1
edr --help

Expected behavior
edr should work

Environment:

  • Elementary CLI (edr) version: 0.16.1
  • OS: Linux, Debian 12
`pip freeze`

about-time==3.1.1
agate==1.9.1
alive-progress==2.3.1
annotated-types==0.7.0
attrs==24.2.0
azure-core==1.31.0
azure-storage-blob==12.23.1
babel==2.16.0
backoff==2.2.1
beautifulsoup4==4.12.3
boto3==1.35.42
botocore==1.35.42
cachetools==5.5.0
certifi==2024.8.30
cffi==1.17.1
charset-normalizer==3.4.0
click==8.1.7
colorama==0.4.6
cryptography==43.0.1
daff==1.3.46
dbt-adapters==1.7.0
dbt-common==1.11.0
dbt-core==1.8.7
dbt-extractor==0.5.1
dbt-semantic-interfaces==0.5.1
deepdiff==7.0.1
elementary-data==0.16.1
google-api-core==2.21.0
google-auth==2.35.0
google-cloud-core==2.4.1
google-cloud-storage==2.18.2
google-crc32c==1.6.0
google-resumable-media==2.7.2
googleapis-common-protos==1.65.0
grapheme==0.6.0
idna==3.10
importlib-metadata==6.11.0
isodate==0.6.1
Jinja2==3.1.4
jmespath==1.0.1
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
leather==0.4.0
Logbook==1.5.3
MarkupSafe==3.0.1
mashumaro==3.13.1
minimal-snowplow-tracker==0.0.2
monotonic==1.6
more-itertools==10.5.0
msgpack==1.1.0
networkx==2.8.8
numpy==2.1.2
ordered-set==4.1.0
packaging==24.0
pandas==2.2.3
parsedatetime==2.6
pathspec==0.12.1
posthog==2.5.0
proto-plus==1.24.0
protobuf==4.25.5
pyasn1==0.6.1
pyasn1_modules==0.4.1
pycparser==2.22
pydantic==2.9.2
pydantic_core==2.23.4
pyfiglet==0.8.post1
pymsteams==0.2.3
python-dateutil==2.9.0.post0
python-slugify==8.0.4
pytimeparse==1.1.8
pytz==2024.2
PyYAML==6.0.2
ratelimit==2.2.1
referencing==0.35.1
requests==2.32.3
rpds-py==0.20.0
rsa==4.9
ruamel.yaml==0.18.6
ruamel.yaml.clib==0.2.8
s3transfer==0.10.3
six==1.16.0
slack_sdk==3.33.1
soupsieve==2.6
sqlparse==0.5.1
tabulate==0.9.0
text-unidecode==1.3
typing_extensions==4.12.2
tzdata==2024.2
urllib3==2.2.3
zipp==3.20.2

@ivan-toriya ivan-toriya added Bug Something isn't working Triage 👀 labels Oct 17, 2024
@ivan-toriya
Copy link
Contributor Author

Works on python 3.11.9

@vbrandon
Copy link

doesn't work on 3.11.10

requirements to build (ubuntu 22.04.5 LTS)

This file was autogenerated by uv via the following command:

uv pip compile .\pyproject.toml -o requirements.txt

about-time==3.1.1
# via alive-progress
agate==1.9.1
# via
# dbt-adapters
# dbt-common
# dbt-core
# dbt-snowflake
alive-progress==2.3.1
# via elementary-data
annotated-types==0.7.0
# via pydantic
appdirs==1.4.4
# via sqlfluff
asn1crypto==1.5.1
# via snowflake-connector-python
attrs==24.2.0
# via
# jsonschema
# referencing
azure-core==1.31.0
# via
# 12825-elementary-build-yml (./pyproject.toml)
# azure-storage-blob
azure-storage-blob==12.23.1
# via elementary-data
babel==2.16.0
# via agate
backoff==2.2.1
# via posthog
backports-tarfile==1.2.0
# via jaraco-context
beautifulsoup4==4.12.3
# via elementary-data
boto3==1.35.45
# via elementary-data
botocore==1.35.45
# via
# boto3
# s3transfer
cachetools==5.5.0
# via google-auth
certifi==2024.8.30
# via
# requests
# snowflake-connector-python
cffi==1.17.1
# via
# cryptography
# snowflake-connector-python
chardet==5.2.0
# via
# diff-cover
# sqlfluff
charset-normalizer==3.4.0
# via
# requests
# snowflake-connector-python
click==8.1.7
# via
# dbt-core
# dbt-semantic-interfaces
# elementary-data
# sqlfluff
colorama==0.4.6
# via
# click
# dbt-common
# pytest
# sqlfluff
# tqdm
cryptography==43.0.3
# via
# azure-storage-blob
# pyopenssl
# snowflake-connector-python
daff==1.3.46
# via dbt-core
dbt-adapters==1.7.0
# via
# dbt-core
# dbt-snowflake
dbt-common==1.11.0
# via
# dbt-adapters
# dbt-core
# dbt-snowflake
dbt-core==1.8.7
# via
# dbt-snowflake
# elementary-data
dbt-extractor==0.5.1
# via dbt-core
dbt-semantic-interfaces==0.5.1
# via dbt-core
dbt-snowflake==1.8.4
# via
# 12825-elementary-build-yml (./pyproject.toml)
# elementary-data
deepdiff==7.0.1
# via dbt-common
diff-cover==9.2.0
# via sqlfluff
elementary-data==0.16.1
# via 12825-elementary-build-yml (./pyproject.toml)
filelock==3.16.1
# via snowflake-connector-python
google-api-core==2.21.0
# via
# google-cloud-core
# google-cloud-storage
google-auth==2.35.0
# via
# google-api-core
# google-cloud-core
# google-cloud-storage
google-cloud-core==2.4.1
# via google-cloud-storage
google-cloud-storage==2.18.2
# via elementary-data
google-crc32c==1.6.0
# via
# google-cloud-storage
# google-resumable-media
google-resumable-media==2.7.2
# via google-cloud-storage
googleapis-common-protos==1.65.0
# via google-api-core
grapheme==0.6.0
# via alive-progress
idna==3.10
# via
# requests
# snowflake-connector-python
importlib-metadata==6.11.0
# via
# dbt-semantic-interfaces
# keyring
iniconfig==2.0.0
# via pytest
isodate==0.6.1
# via
# agate
# azure-storage-blob
# dbt-common
jaraco-classes==3.4.0
# via keyring
jaraco-context==6.0.1
# via keyring
jaraco-functools==4.1.0
# via keyring
jinja2==3.1.4
# via
# dbt-common
# dbt-core
# dbt-semantic-interfaces
# diff-cover
# sqlfluff
jmespath==1.0.1
# via
# boto3
# botocore
jsonschema==4.23.0
# via
# dbt-common
# dbt-semantic-interfaces
jsonschema-specifications==2024.10.1
# via jsonschema
keyring==25.4.1
# via snowflake-connector-python
leather==0.4.0
# via agate
logbook==1.5.3
# via dbt-core
markupsafe==3.0.2
# via jinja2
mashumaro==3.13.1
# via
# dbt-adapters
# dbt-common
# dbt-core
minimal-snowplow-tracker==0.0.2
# via dbt-core
monotonic==1.6
# via posthog
more-itertools==10.5.0
# via
# dbt-semantic-interfaces
# jaraco-classes
# jaraco-functools
msgpack==1.1.0
# via mashumaro
networkx==2.8.8
# via
# dbt-core
# elementary-data
numpy==2.1.2
# via pandas
ordered-set==4.1.0
# via deepdiff
packaging==24.0
# via
# dbt-core
# elementary-data
# pytest
# snowflake-connector-python
pandas==2.2.3
# via elementary-data
parsedatetime==2.6
# via agate
pathspec==0.12.1
# via
# dbt-common
# dbt-core
# sqlfluff
platformdirs==4.3.6
# via snowflake-connector-python
pluggy==1.5.0
# via
# diff-cover
# pytest
posthog==2.5.0
# via elementary-data
proto-plus==1.24.0
# via google-api-core
protobuf==4.25.5
# via
# dbt-adapters
# dbt-common
# dbt-core
# google-api-core
# googleapis-common-protos
# proto-plus
pyasn1==0.6.1
# via
# pyasn1-modules
# rsa
pyasn1-modules==0.4.1
# via google-auth
pycparser==2.22
# via cffi
pydantic==2.9.2
# via
# dbt-semantic-interfaces
# elementary-data
# pydantic-settings
pydantic-core==2.23.4
# via pydantic
pydantic-settings==2.6.0
# via 12825-elementary-build-yml (./pyproject.toml)
pyfiglet==0.8.post1
# via elementary-data
pygments==2.18.0
# via diff-cover
pyjwt==2.9.0
# via snowflake-connector-python
pymsteams==0.2.3
# via elementary-data
pyopenssl==24.2.1
# via snowflake-connector-python
pytest==8.3.3
# via sqlfluff
python-dateutil==2.9.0.post0
# via
# botocore
# dbt-common
# dbt-semantic-interfaces
# pandas
# posthog
python-dotenv==1.0.1
# via pydantic-settings
python-slugify==8.0.4
# via agate
pytimeparse==1.1.8
# via agate
pytz==2024.2
# via
# dbt-adapters
# dbt-core
# pandas
# snowflake-connector-python
pywin32-ctypes==0.2.3
# via keyring
pyyaml==6.0.2
# via
# dbt-core
# dbt-semantic-interfaces
# sqlfluff
ratelimit==2.2.1
# via elementary-data
referencing==0.35.1
# via
# jsonschema
# jsonschema-specifications
regex==2024.9.11
# via sqlfluff
requests==2.32.3
# via
# azure-core
# dbt-common
# dbt-core
# elementary-data
# google-api-core
# google-cloud-storage
# minimal-snowplow-tracker
# posthog
# pymsteams
# snowflake-connector-python
rpds-py==0.20.0
# via
# jsonschema
# referencing
rsa==4.9
# via google-auth
ruamel-yaml==0.18.6
# via elementary-data
ruamel-yaml-clib==0.2.12
# via ruamel-yaml
s3transfer==0.10.3
# via boto3
six==1.16.0
# via
# azure-core
# isodate
# minimal-snowplow-tracker
# posthog
# python-dateutil
slack-sdk==3.33.1
# via elementary-data
snowflake-connector-python==3.12.2
# via dbt-snowflake
sortedcontainers==2.4.0
# via snowflake-connector-python
soupsieve==2.6
# via beautifulsoup4
sqlfluff==3.2.4
# via 12825-elementary-build-yml (./pyproject.toml)
sqlparse==0.5.1
# via dbt-core
tabulate==0.9.0
# via elementary-data
tblib==3.0.0
# via sqlfluff
text-unidecode==1.3
# via python-slugify
tomlkit==0.13.2
# via snowflake-connector-python
tqdm==4.66.5
# via sqlfluff
typing-extensions==4.12.2
# via
# azure-core
# azure-storage-blob
# dbt-adapters
# dbt-common
# dbt-core
# dbt-semantic-interfaces
# mashumaro
# pydantic
# pydantic-core
# snowflake-connector-python
tzdata==2024.2
# via
# agate
# pandas
urllib3==2.2.3
# via
# botocore
# requests
zipp==3.20.2
# via importlib-metadata

@mahiki
Copy link

mahiki commented Nov 11, 2024

This is a very vexing bug, I am running edr in poetry environment with python 3.12.5,

poetry run edr --version
Elementary version 0.16.1.

and I'm using it normally. But on gitlab CI with image:python:3.12.5 I get the same error.

@adamharperCrisp
Copy link

per another slack thread, run the following and it works

pip install setuptools

@ellakz
Copy link
Contributor

ellakz commented Nov 24, 2024

Thanks for opening @ivan-toriya and for suggesting a workaround @adamharperCrisp !
Looks like there's a working solution so closing this for now, reopen if anything else is needed here 🙏

@ellakz ellakz closed this as completed Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Triage 👀
Projects
None yet
Development

No branches or pull requests

5 participants