python3的pipenv仅创建python3 shell,即使已传递参数--two。我们需要为两个python安装pipenv吗?

时间:2018-12-17 17:59:31

标签: python pipenv

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) 

1 个答案:

答案 0 :(得分:0)

发生这种情况的原因是因为pipenv正在选择python3 pipenv.oops! 您需要通过以下方式在python2 pipenv中使用lib: python2 -m pipenv安装x