-
I'm trying to install a package (statsmodels in this case) from git if on Python 3.11 or higher, and otherwise reguarly from PyPI. I would expect I have to specify it like this: [project]
dependencies = [
"numpy",
"pandas",
"statsmodels; python_version < '3.11'",
"statsmodels @ git+https://github.com/statsmodels/statsmodels.git; python_version >= '3.11'",
] But that results in the following error:
Conditional Python version works: [project]
dependencies = [
"numpy",
"pandas",
"statsmodels; python_version < '3.11'",
] Installing from git also: [project]
dependencies = [
"numpy",
"pandas",
"statsmodels @ git+https://github.com/statsmodels/statsmodels.git",
] But when combined, setuptools can't parse is correctly. Do I need to specify it differently? Or is this a bug? (setuptools 65.5.0, and happens on all Python versions) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I believe you simply need to insert a space between the URL and the semicolon; otherwise, the semicolon will be interpreted as part of the URL, resulting in a parse error. |
Beta Was this translation helpful? Give feedback.
-
Recently ran into this issue too. Would be lovely if this was more clearly documented. |
Beta Was this translation helpful? Give feedback.
I believe you simply need to insert a space between the URL and the semicolon; otherwise, the semicolon will be interpreted as part of the URL, resulting in a parse error.