Closed MHuberFaust closed 2 years ago
After fixing the problem above
running
pip3 install .
resulted into this:
(base) C:\Users\knutt\raiseWikibase>pip3 install .
Processing c:\users\knutt\raisewikibase
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\knutt\anaconda3\python.exe' -c 'import io, os,
sys, setuptools, tokenize; sys.argv[0] =
'"'"'C:\\Users\\knutt\\raiseWikibase\\setup.py'"'"';
__file__='"'"'C:\\Users\\knutt\\raiseWikibase\\setup.py'"'"';f =
getattr(tokenize, '"'"'open'"'"', open)(__file__) if
os.path.exists(__file__) else io.StringIO('"'"'from setuptools import
setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"',
'"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))'
egg_info --egg-base
'C:\Users\knutt\AppData\Local\Temp\pip-pip-egg-info-acikcyib'
cwd: C:\Users\knutt\raiseWikibase\
Complete output (39 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\knutt\raiseWikibase\setup.py", line 8, in <module>
setup(
File
"C:\Users\knutt\anaconda3\lib\site-packages\setuptools\__init__.py",
line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Users\knutt\anaconda3\lib\distutils\core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File
"C:\Users\knutt\anaconda3\lib\site-packages\setuptools\dist.py", line
453, in __init__
_Distribution.__init__(
File "C:\Users\knutt\anaconda3\lib\distutils\dist.py", line 292,
in __init__
self.finalize_options()
File
"C:\Users\knutt\anaconda3\lib\site-packages\setuptools\dist.py", line
831, in finalize_options
ep(self)
File
"C:\Users\knutt\anaconda3\lib\site-packages\setuptools\dist.py", line
852, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File
"c:\users\knutt\raisewikibase\.eggs\setuptools_scm-6.3.2-py3.9.egg\setuptools_scm\integration.py", line 65, in
version_keyword
dist.metadata.version = _get_version(config)
File
"c:\users\knutt\raisewikibase\.eggs\setuptools_scm-6.3.2-py3.9.egg\setuptools_scm\__init__.py", line 177, in
_get_version
parsed_version = _do_parse(config)
File
"c:\users\knutt\raisewikibase\.eggs\setuptools_scm-6.3.2-py3.9.egg\setuptools_scm\__init__.py", line 128, in
_do_parse
version = _version_from_entrypoints(config) or
_version_from_entrypoints(
File
"c:\users\knutt\raisewikibase\.eggs\setuptools_scm-6.3.2-py3.9.egg\setuptools_scm\__init__.py", line 69, in
_version_from_entrypoints
version = _call_entrypoint_fn(root, config, ep.load())
File
"c:\users\knutt\raisewikibase\.eggs\setuptools_scm-6.3.2-py3.9.egg\setuptools_scm\__init__.py", line 48, in
_call_entrypoint_fn
return fn(root, config=config)
File
"c:\users\knutt\raisewikibase\.eggs\setuptools_scm-6.3.2-py3.9.egg\setuptools_scm\git.py", line 135, in
parse
return _git_parse_inner(
File
"c:\users\knutt\raisewikibase\.eggs\setuptools_scm-6.3.2-py3.9.egg\setuptools_scm\git.py", line 170, in
_git_parse_inner
return meta(
File
"c:\users\knutt\raisewikibase\.eggs\setuptools_scm-6.3.2-py3.9.egg\setuptools_scm\version.py", line 186, in
meta
parsed_version = _parse_tag(tag, preformatted, config)
File
"c:\users\knutt\raisewikibase\.eggs\setuptools_scm-6.3.2-py3.9.egg\setuptools_scm\version.py", line 167, in
_parse_tag
tag = tag_to_version(tag, config)
File
"c:\users\knutt\raisewikibase\.eggs\setuptools_scm-6.3.2-py3.9.egg\setuptools_scm\version.py", line 75, in
tag_to_version
version = config.version_cls(version)
File
"C:\Users\knutt\anaconda3\lib\site-packages\packaging\version.py",
line 266, in __init__
raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: 'v1.35.0-wmde.0'
----------------------------------------
WARNING: Discarding file:///C:/Users/knutt/raiseWikibase. Command
errored out with exit status 1: python setup.py egg_info Check the
logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py
egg_info Check the logs for full command output.
I did not try it on another machine. So it might be related to this system being Windows or the lates updates.
Best,
Michael
Well, it says packaging.version.InvalidVersion: Invalid version: 'v1.35.0-wmde.0'
. Could you try to change the version value in setup.py to any other value, e.g., 1.0.0? May be for some reason it just does not like the string "1.35.0-wmde.0"...
It probably has to do with version='1.35.0-wmde.0' not being a valid version according to PEP440
Changing the version in setup.py did not change the outcome. (already tried it)
Is it the same error message after you changed the version?
Does it look somewhere else? Also, the error code says 'v1.35.0-wmde.0' , which suggests the former.
Is it the same error message after you changed the version?
the error message stays the same
Try in editable mode pip install -e .
same error
Try uninstalling
"Skipping RaiseWikibase as it is not installed."
Edit: I assumed you wanted me to uninstall and reinstall with pip
Right, it is not yet installed obviously :)
Try pip with --use-deprecated=legacy-resolver
still the same
May be downgrading pip to the version when PEP440 was not used? Is there a version?
A workaround might be downgrading to pip 21.0 as hinted here where --use-deprecated=legacy-resolver still works.
It still seems to be worth it to change the tag to an PEP440 valid version.
Agree!
I've changed version in setup.py to "1.35.4" according to the used Wikibase Docker image.
6c618bc34529cba88a2e724449626c297815a19b
in setup.py did not fix it.
I think it looks at different metadata. (maybe https://github.com/UB-Mannheim/RaiseWikibase/releases/tag/v1.35.0-wmde.0)
A workaround might be downgrading to pip 21.0 as hinted here where --use-deprecated=legacy-resolver still works.
It still seems to be worth it to change the tag to an PEP440 valid version.
did not work either and results in the same error message.
I've just created a new release v1.35.4 based on the latest Wikibase Docker.
That did it!
For me to run it, it still needs specifying the encoding in the with-open statement.
with open("README.md", "r", encoding='utf-8') as fh:
long_description = fh.read()
Would you like to make a pull request for that?
Hi,
I'm trying an install on a Windows machine as a test run and found into several problems so far: (Usually I tried to avoid Windows, so I might not be as familiar with common workarounds)
The Windows console had encoding issues:
Specifying the encoding in setup.py fixed it.