ImportError: cannot import name 'Version' from 'packaging.version'
See original GitHub issuerequirements.txt
gpt_index
numpy==1.23.5
pandas==1.5.2
torch
tensorflow
slack_sdk==3.19.5
generate_index.py
import gpt_index
reader = gpt_index.SlackReader(slack_token='XXX)
documents = reader.load_data(channel_ids=[
'XXX',
'XXX',
])
index = gpt_index.GPTTreeIndex(documents)
index.save_to_disk('gpt-index.json')
python3.10 ./generate_index.py returns error
Traceback (most recent call last):
File "/mnt/c/Users/Slach/Downloads/altinity.staff/src/github.com/altinity/slack-qa/./generate_index.py", line 1, in <module>
import gpt_index
File "/home/slach/venv/slack-qa/lib/python3.10/site-packages/gpt_index/__init__.py", line 9, in <module>
from gpt_index.indices.keyword_table.base import GPTKeywordTableIndex
File "/home/slach/venv/slack-qa/lib/python3.10/site-packages/gpt_index/indices/keyword_table/base.py", line 15, in <module>
from gpt_index.indices.base import (
File "/home/slach/venv/slack-qa/lib/python3.10/site-packages/gpt_index/indices/base.py", line 17, in <module>
from gpt_index.indices.data_structs import IndexStruct
File "/home/slach/venv/slack-qa/lib/python3.10/site-packages/gpt_index/indices/data_structs.py", line 9, in <module>
from dataclasses_json import DataClassJsonMixin
File "/home/slach/venv/slack-qa/lib/python3.10/site-packages/dataclasses_json/__init__.py", line 2, in <module>
from dataclasses_json.api import (DataClassJsonMixin,
File "/home/slach/venv/slack-qa/lib/python3.10/site-packages/dataclasses_json/api.py", line 6, in <module>
from dataclasses_json.cfg import config, LetterCase # noqa: F401
File "/home/slach/venv/slack-qa/lib/python3.10/site-packages/dataclasses_json/cfg.py", line 5, in <module>
from marshmallow.fields import Field as MarshmallowField
File "/home/slach/venv/slack-qa/lib/python3.10/site-packages/marshmallow/__init__.py", line 3, in <module>
from packaging.version import Version
ImportError: cannot import name 'Version' from 'packaging.version' (/home/slach/venv/slack-qa/lib/python3.10/site-packages/packaging/version.py)
could you suggest properly libraries version?
Issue Analytics
- State:
- Created 9 months ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
packaging no version #4 - facebookresearch/TorchRay - GitHub
... torchvision 0.3.0 when running the example code, there is an error: from packaging import version ImportError: cannot import name 'version'
Read more >cannot import name 'version' from 'packaging' (transformers ...
Python ImportError: cannot import name 'version' from 'packaging' (transformers) · Which version of transformers have you installed? – cronoik.
Read more >from packaging import version as pack_version ImportError
Dears, I am running a python code that generates for me this error : from packaging import version as pack_version ImportError: No module...
Read more >How to Fix ImportError: Cannot Import Name in Python - Rollbar
The Python ImportError: cannot import name error occurs when an imported class is not accessible or is in a circular dependency.
Read more >How to Fix : “ImportError: Cannot import name X” in Python
In Python "ImportError: cannot import name" error generally occurs when the imported class is not accessible, or the imported class is in a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
thanks for your great simple library
sorry, it was my broken virtual environment