托克斯可以找到python版本
我有一个tox.ini
需要以可编辑模式安装软件包。但是,该软件包没有setup.py
- 意味着为了安装它,一个新的pip
版本(我认为21.4是足够的,但是要确保,我执行> = 22)
要在本地运行,我刚刚运行:
python3 -m virtualenv venv
。 VENV/bin/activate&& PIP安装PIP> = 22
。 VENV/bin/activate&& pip install -e< pkg -path>
我的tox.ini
看起来像:
[tox]
envlist = py3
requires =
tox-pipenv >= 1.10
; Older pip can't install in editable mode without setup.py
pip >= 22.0.0
[testenv]
; Install "pkg" in editable mode
deps =
-e <pkg-path>
commands =
...
这抛出以下内容:
int(version_dict["major"]) if version_dict.get("major") is not None else major
ValueError: invalid literal for int() with base 10: '.tox/bin/python'
================================================================================ log end ================================================================================
ERROR: InvocationError for command .../.tox/.tox/bin/python -m pipenv --python .tox/bin/python (exited with code 1)
________________________________________________________________________________ summary ________________________________________________________________________________
ERROR: py3: InvocationError for command .../.tox/.tox/bin/python -m pipenv --python .tox/bin/python (exited with code 1)
这意味着,这是由于某种原因,我没有有效的python。 ..
我怀疑
tox-pipenv >= 1.10
pip >= 22.0.0
台词,但我不能做对了
I have a tox.ini
that needs to install a package in editable mode. However, the package has no setup.py
- meaning that in order to install it, a new pip
version (I think 21.4 is enough, but just to be sure, I enforce >=22)
To run this locally, I just run:
python3 -m virtualenv venv
. venv/bin/activate && pip install pip>=22
. venv/bin/activate && pip install -e <pkg-path>
My tox.ini
looks like:
[tox]
envlist = py3
requires =
tox-pipenv >= 1.10
; Older pip can't install in editable mode without setup.py
pip >= 22.0.0
[testenv]
; Install "pkg" in editable mode
deps =
-e <pkg-path>
commands =
...
This throws the following:
int(version_dict["major"]) if version_dict.get("major") is not None else major
ValueError: invalid literal for int() with base 10: '.tox/bin/python'
================================================================================ log end ================================================================================
ERROR: InvocationError for command .../.tox/.tox/bin/python -m pipenv --python .tox/bin/python (exited with code 1)
________________________________________________________________________________ summary ________________________________________________________________________________
ERROR: py3: InvocationError for command .../.tox/.tox/bin/python -m pipenv --python .tox/bin/python (exited with code 1)
which means, that for some reason, I don't have a valid python...
I suspect the
tox-pipenv >= 1.10
pip >= 22.0.0
lines, but I can't make it right
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个解决方法 - 但它有效。
我发现(手动检查了几个版本后)
virtualenv == 20.10
带有一个足够的新pip
,所以我尝试使用它...我
用另一个依赖关系 替换了-
virtualenv
:出于某种原因 - 这起作用!
这里有一个奇怪的问题:以下行(每当我构建旧的
tox.ini
时,我都会看到它:这可能仅由于我的默认
virtualenv
现在更新...edit:false警报::)实际上是正确的解决方案...我没有看到该解决方案行是因为
tox
跳过了它,因为它已经满足了要求。现在我降级virtualenv
,该行回来了:)This is a workaround - but it works.
I found out (after checking several versions manually) that
virtualenv==20.10
comes with a new enoughpip
, so I tried using that...I replaced the
with another dependency -
virtualenv
:and for some reason - this works!
There is a weird issue here: the following line (which I used to see whenever I built the old
tox.ini
) is missing:Not sure what it means, but I think that probably something is wrong on my setup. It is possible that this works only because my default
virtualenv
is now updated...EDIT: False alarm :) It is actually the correct solution... The reason I didn't see that line was because
tox
skipped it because it already has satisfied the requirements. Now I downgradedvirtualenv
and the line is back :)