小编Vie*_*ank的帖子

使用 pip3 安装 mysqlclient 时遇到问题

我正在尝试使用 Django 设置一个 python 3.6 环境。安装说明说我应该安装 mysqlclient 才能连接到 mySQL。我明白了:

dennis@django:~$ sudo -H pip3 install mysqlclient
Collecting mysqlclient
  Using cached mysqlclient-1.3.10.tar.gz
    Complete output from command python setup.py egg_info:
    /bin/sh: 1: mysql_config: not found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-4jiw3hvk/mysqlclient/setup.py", line 17, in <module>
        metadata, options = get_config()
      File "/tmp/pip-build-4jiw3hvk/mysqlclient/setup_posix.py", line 44, in get_config
        libs = mysql_config("libs_r")
      File "/tmp/pip-build-4jiw3hvk/mysqlclient/setup_posix.py", line 26, in mysql_config
        raise EnvironmentError("%s not found" % (mysql_config.path,))
    OSError: mysql_config not found

    ----------------------------------------
Command …
Run Code Online (Sandbox Code Playgroud)

python mysql django

6
推荐指数
3
解决办法
2万
查看次数

boto3 - aws sns - 指定发件人ID

以下代码用于发送消息,但是当它到达时,它会显示发件人ID的文本"VERIFY".如何指定发件人ID?我认为这是使用消息属性完成的,但我无法弄清楚语法.

session = boto3.session.Session(profile_name='Credentials',region_name='us-east-1')
theMessage='Now is the time for all good people to come to the aid of their party'
senderID='Godzilla'
snsclient = session.client('sns')
response = snsclient.publish(PhoneNumber='+84932575571', Message=theMessage)
pp = pprint.PrettyPrinter(indent=4)
print(pp.pprint(response))
Run Code Online (Sandbox Code Playgroud)

amazon-web-services amazon-sns boto3

0
推荐指数
1
解决办法
425
查看次数

标签 统计

amazon-sns ×1

amazon-web-services ×1

boto3 ×1

django ×1

mysql ×1

python ×1