Closed RubenKelevra closed 2 years ago
Seems to be caused by a change in the collection API in Python 3.10. So currently the measure script will only work with Python 3.9 max. See https://stackoverflow.com/questions/69381312/in-vs-code-importerror-cannot-import-name-mapping-from-collections
I did have a quick look if we can add support for 3.10 however the underlying library I used for the question/answer wizard does not support it and is unmaintained. https://github.com/CITGuru/PyInquirer. I have found a similar library which seems to be a good replacement and has Python 3.10 support and is also maintained. https://github.com/magmax/python-inquirer. But it is no drop in replacement, so we need to refactor some code. I will create an issue to add to the backlog.
For now I would suggest to downgrade to Python 3.9 or run Python 3.9 next to 3.10 when you are using 3.10 for other purposes.
I will also add a note to the readme.
@bramstroker or you just merge the PyInquirer code into this repo and update the corresponding elements you need?
Not sure what's less work. :)
For now I would suggest to downgrade to Python 3.9 or run Python 3.9 next to 3.10 when you are using 3.10 for other purposes.
Well, that's not possible – as python 3.10 is shipped in my distro. I guess I just have to use the docker image?
@bramstroker or you just merge the PyInquirer code into this repo and update the corresponding elements you need?
Not sure what's less work. :)
Yes that would also be a possible solution.
For now I would suggest to downgrade to Python 3.9 or run Python 3.9 next to 3.10 when you are using 3.10 for other purposes.
Well, that's not possible – as python 3.10 is shipped in my distro. I guess I just have to use the docker image?
Yes the docker image is the preferred way of running anyway, but I thought you wanted to do some development on the measure tool and that would be the reason you wanted to run it native.
When you want to edit the code locally and run Python 3.9 you could also run python 3.9 docker image https://hub.docker.com/_/python, and volume map the util measure sources into this container. Then you don't have to install python 3.9 on your system as your distro already ships with 3.10.
I got this error after following the venv setup process. Python version is 3.10.4.