是否可以在Pipfile中指定`--no-binary:all:`?

时间:2019-04-17 14:46:03

标签: python pipenv pipfile

我想切换到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的需要?

1 个答案:

答案 0 :(得分:2)

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

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