我已经在pypi站点"sndboxapi“上创建了一个新的pip包,我可以执行pip安装sndboxapi
,但是我不能在代码中导入它。
我已经创建了一系列环境,但它们都安装了OK,但不允许我使用模块。
robot@Robot:~/Documents$ python3 -m venv test
robot@Robot:~/Documents$ source test/bin/activate
(test) robot@Robot:~/Documents$ which python
/home/机器人/文档/测试/bin/python
(test) robot@Robot:~/Documents$ python
Python 3.6.7 (缺省值,2018年10月22日,11:32:17)
(test) robot@Robot:~/Documents$ pip --version
pip 9.0.1来自/home/robot/Documents/test/lib/python3.6/site-packages (python3.6)
(test) robot@Robot:~/Documents$ pip install sndboxapi
采沙蜂 使用缓存的https://files.pythonhosted.org/packages/5a/74/b2ef5a92483209b1a3225ffcba180a25bac517f7b2670eb0dabe43f6fa7f/sndboxapi-1.3-py3-none-any.whl 安装收集的软件包: sndboxapi 成功安装sndboxapi-1.3
(test) robot@Robot:~/Documents$ pip list
弃用:默认格式将在将来切换到列。您可以使用--format=(旧式多列)(或在列表部分下的format=(旧版)中定义一个pip.conf )来禁用此警告。和平执行方案(9.0.1) pkg-资源(0.0.0) 安装工具(39.0.1) sndboxapi (1.3)
(test) robot@Robot:~/Documents$ python
Python 3.6.7 (缺省值,2018年10月22日,11:32:17)
>>> import sndboxapi
回溯(最近一次调用): 文件"< stdin >",第1行 ModuleNotFoundError:没有名为'sndboxapi‘的模块
我期望输出允许我导入模块,然后允许我调用函数。
发布于 2019-05-08 16:55:11
文档说:
from sndbox import sndboxapi
https://stackoverflow.com/questions/56039261
复制相似问题