5

我想切换到pipenv,但转换我的电流requirements.txt不是 1:1。

requirements.txt包含:

...
lxml==3.8.0 --no-binary :all:
pandas==0.23.4
...

所以,当我运行它时,pipenv install它运行良好:

$ pipenv install
requirements.txt found, instead of Pipfile! Converting…
✔ Success! 
Warning: Your Pipfile now contains pinned versions, if your requirements.txt did. 
We recommend updating your Pipfile to specify the "*" version, instead.
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
✔ Success! 
Updated Pipfile.lock (383f9f)!
Installing dependencies from Pipfile.lock (383f9f)…
     ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 44/44 — 00:00:05
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.

...但生成的Pipfile仅包含:

...
lxml = "==3.8.0"
pandas = "==0.23.4"
...

--no-binary :all:有没有办法在中指定需要Pipfile

4

1 回答 1

5

PIP_...pipenv 尊重任何 PIP 变量,因此通过env vars支持大多数 pip 选项。

虽然不完全是您想要的,但PIP_NO_BINARY=lxml在运行 pipenv 之前进行设置可能是朝着正确方向迈出的一步。

于 2019-07-15T12:52:28.483 回答