小编si_*_*mon的帖子

安装 scikit-image 的问题可能是由于 blosc

嗨,我正在尝试在 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)

python installation scikit-image

8
推荐指数
1
解决办法
1055
查看次数

来自 python 脚本的缺少范围错误松弛消息

如果我运行以下脚本从 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错误?

python python-3.x slack-api slack

4
推荐指数
1
解决办法
3146
查看次数