Can't import VersionInfo in python3.7
See original GitHub issueTo reproduce:
~> py --version
Python 3.7.6
~> pip3 install semver
Collecting semver
Using cached semver-2.9.1-py2.py3-none-any.whl (9.8 kB)
Installing collected packages: semver
Successfully installed semver-2.9.1
~> py
Python 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from semver import VersionInfo
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'VersionInfo' from 'semver' (C:\Users\me\AppData\Local\Programs\Python\Python37\lib\site-packages\semver\__init__.py)
I’ve also tried it without the wheel by passing in --install-option=“–no-compile” – no luck. semver works great for me in 32-bit python 2.7.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Can't import version (in setup.py) - Stack Overflow
There is some problem with importing version module, ... If I execute this command: python3 setup.py bdist_rpm (I am on Fedora).
Read more >Porting Python 2 Code to Python 3 — Python 3.11.1 ...
The following table lists the unique methods of each data type across Python 2 & 3 (e.g., the decode() method is usable on...
Read more >Why Can't Python Find My Modules? - Real Python
... meaning that the module you've tried to import cannot be… ... so something like /usr/local/bin/python3.7 -m pip will use the pip ...
Read more >Install Python, pip, and the EB CLI on Linux
pip --version pip 8.1.2 from ~/.local/lib/python3.7/site-packages (python 3.7). Use pip to install the EB CLI. $ pip install awsebcli --upgrade --user.
Read more >Issue - Panther Knowledge Base
How do I resolve the error "ImportError: cannot import name 'Final' from 'typing' (/usr/local/lib/python3.7/typing.py)" when using Panther ...
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
I think that somehow I received this file https://github.com/podhmo/python-semver/blob/89667077eada74eb348cf5ecfa7563f40fdbf544/semver/__init__.py
While
semver-2.9.1-py2.py3-none-any.whl
came from this (python-semver) project, I suppose it could be that either pip, my interpreter, or environment were preferring this file that is not associated with python-semver.I think at this point, it isn’t actionable for the python-semver maintainers. You can close this if you agree. Thanks for your quick response!
I see. Thanks for your debugging. Much appreciated! 👍
Good that we haven’t switched to a semver packaging yet. 😉 It’s unfortunate that both libraries have the same name.
Ok, I’ll close this bug then. Thanks and stay healthy.