python3 的 pipenv,仅创建 python3 shell,即使传递了参数 --two。 .我们需要为 python 都安装 pipenv 吗?
python3's pipenv, is only creating python3 shell,even though the parameter --two is passed. .Do we need to install pipenv for both python?
campaign_response sidvis$ pipenv --two shell
:
✔ Successfully created virtual environment!
:
(campaign_response) bash-3.2$
现在 pipenv campaign_response 已设置!但由于 python3.6 依赖关系而失败。
(campaign_response) bash-3.2$ pipenv install x
Installing x…
Adding silverpop to Pipfile's [packages]…
✔ Installation Succeeded
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
✘ Locking Failed!
.
..
...
from typing import TYPE_CHECKING
File "/anaconda3/lib/python3.6/site-packages/typing.py", line 133
def __new__(cls, name, bases, namespace, *, _root=False):
并且 python3 默认 python:
(campaign_response) bash-3.2$ python
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 12:04:33)
它发生的原因是因为 pipenv 正在选择 python3 pipenv.oops!
您需要在 python2 pipenv 中使用一个库,方法是将其传递为:
python2 -m pipenv 安装 x
campaign_response sidvis$ pipenv --two shell
:
✔ Successfully created virtual environment!
:
(campaign_response) bash-3.2$
现在 pipenv campaign_response 已设置!但由于 python3.6 依赖关系而失败。
(campaign_response) bash-3.2$ pipenv install x
Installing x…
Adding silverpop to Pipfile's [packages]…
✔ Installation Succeeded
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
✘ Locking Failed!
.
..
...
from typing import TYPE_CHECKING
File "/anaconda3/lib/python3.6/site-packages/typing.py", line 133
def __new__(cls, name, bases, namespace, *, _root=False):
并且 python3 默认 python:
(campaign_response) bash-3.2$ python
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 12:04:33)
它发生的原因是因为 pipenv 正在选择 python3 pipenv.oops! 您需要在 python2 pipenv 中使用一个库,方法是将其传递为: python2 -m pipenv 安装 x