python响应程序库能否在conda环境中工作



我正在尝试使用响应程序包(https://github.com/taoufik07/responder)在conda环境中。但我得到了以下错误:

conda create --name tmp python=3.7
conda activate tmp
conda install -c conda-forge responder
python -c "import responder;"

然后我得到了这个:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/x/opt/anaconda3/envs/dex/lib/python3.7/site-packages/responder/__init__.py", line 1, in <module>
from .core import *
File "/Users/x/opt/anaconda3/envs/dex/lib/python3.7/site-packages/responder/core.py", line 1, in <module>
from .api import API
File "/Users/x/opt/anaconda3/envs/dex/lib/python3.7/site-packages/responder/api.py", line 20, in <module>
from . import models, status_codes
File "/Users/x/opt/anaconda3/envs/dex/lib/python3.7/site-packages/responder/models.py", line 12, in <module>
import graphene
File "/Users/x/opt/anaconda3/envs/dex/lib/python3.7/site-packages/graphene/__init__.py", line 19, in <module>
from .types import (
File "/Users/x/opt/anaconda3/envs/dex/lib/python3.7/site-packages/graphene/types/__init__.py", line 7, in <module>
from .scalars import Scalar, String, ID, Int, Float, Boolean
File "/Users/x/opt/anaconda3/envs/dex/lib/python3.7/site-packages/graphene/types/scalars.py", line 2, in <module>
from graphql.language.ast import (BooleanValue, FloatValue, IntValue,
ImportError: cannot import name 'BooleanValue' from 'graphql.language.ast' (/Users/x/opt/anaconda3/envs/dex/lib/python3.7/site-packages/graphql/language/ast.py)

我想您还没有激活Conda环境

手动流程

以上错误不是模块错误导入错误,因此在该模块中缺少一些东西,请转到站点包并进入该库,然后检查代码

重新安装

删除该库,然后通过pip或下面的命令重新安装,检查python版本。

$ pipenv install responder
$ pipenv install -e git+https://github.com/taoufik07/responder.git#egg=responder