python - python3 的 pipenv,只是创建 python3 shell,即使参数 --two 被传递。.我们需要为两个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)
解决方案
它发生的原因是因为 pipenv 正在选择 python3 pipenv.oops!您需要在 python2 pipenv 中使用 lib,方法是将其传递为:python2 -m pipenv install x
推荐阅读
- php - 在 Laravel Eloquent get() 查询中插入未定义的变量
- ios - iOS Swift:UIImagePickerController HEIC 转 Jpg
- linq - 实体框架 LINQ 调用 switchoffset() 函数
- spring - 无法在 mac 的 Visual Studio 代码中创建 tomcat 服务器
- r - 等效于 ifelse 但在 R 中有一个选项?
- git - 如何检查git标签中是否存在文件夹
- azure-ad-b2c - 在使用 msal.js 的 Azure B2C 身份验证中,b2cScopes 的含义和语法是什么?
- networking - 有哪些方法可以确保 UDP 按顺序传送数据包?
- angular - 动态渲染组件
- tcp - 为什么 tcp 实现使用字节序列号而不是段号进行流量控制?