嗨,我正在尝试在 ubuntu 18.04 的虚拟环境中安装 scikit 映像。
它在尝试安装 imagecodecs 时失败,我尝试单独安装 imagecodecs,但它给出了相同的错误,这是由于 blosc 引起的。我单独安装了 blosc,但不知何故这仍然失败。
/usr/include/python3.6m/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by " \
^~~~~~~
imagecodecs/_blosc.c:602:10: fatal error: blosc.h: No such file or directory
#include "blosc.h"
^~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/home/xxxx/im_an/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ijwkwo7f/imagecodecs/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-4xtori6c-record/install-record.txt --single-version-externally-managed --compile --install-headers …Run Code Online (Sandbox Code Playgroud) 如果我运行以下脚本从 slack 发送消息,我会收到丢失范围错误,到目前为止我无法解决该错误!
import logging
logging.basicConfig(level=logging.DEBUG)
from slack import WebClient
from slack.errors import SlackApiError
slack_token = 'xoxb-xxxxxx-xxxxxxxx'
client = WebClient(token=slack_token)
try:
response = client.chat_postMessage(
channel="C018KGV8GHJ",
text="Hello from your app! :tada:"
)
except SlackApiError as e:
#You will get a SlackApiError if "ok" is False
assert e.response["error"] # str like 'invalid_auth', 'channel_not_found'
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:“ok”:False,“error”:“missing_scope”,“needed”:“chat:write:bot”,“provided”:“incoming-webhook”
该脚本来自 Slack 网页。
如何解决missing_scope错误?