日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

qcloud-python-sts 下载安装

發布時間:2023/12/31 python 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 qcloud-python-sts 下载安装 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

解決騰訊云下載sts/nstall -U ython-sts報錯:

應該有人會出現這樣的報錯:

Collecting qcloud-python-sts
? Using cached qcloud-python-sts-3.1.1.tar.gz (5.9 kB)
? Preparing metadata (setup.py) ... error
? error: subprocess-exited-with-error

? × python setup.py egg_info did not run successfully.
? │ exit code: 1
? ╰─> [6 lines of output]
? ? ? Traceback (most recent call last):
? ? ? ? File "<string>", line 2, in <module>
? ? ? ? File "<pip-setuptools-caller>", line 34, in <module>
? ? ? ? File "C:\Users\suichu\AppData\Local\Temp\pip-install-ks4zcaeh\qcloud-python-sts_5d9378b728a74916bb25450687600b2e\setup.py", line 5, in <module>
? ? ? ? ? long_description = fh.read()
? ? ? UnicodeDecodeError: 'gbk' codec can't decode byte 0x8b in position 82: illegal multibyte sequence
? ? ? [end of output]

? note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

這里也不看是什么原因了,直接手動去官網下載:qcloud-python-sts · PyPI

下載完成后解壓? 是這樣一個文件:

把它拖到你python包的路徑下面

比如我的python安裝在了C盤,那路徑如下:

在騰訊云的SDK文檔中 demo里是直接from sts.sts import Sts

我們只需要把上面說的下載下來的文件名字重命名為sts就好了。

這之后 我們運行代碼發現還會報錯,經分析是無法導入sts下的sts的sts.py中的Sts類導致的。所以我們點開文件:

雙擊sts.py?

加上這樣一句話就可以了

from sts.sts.sts import Sts

然后就解決了,干凈又衛生。

總結

以上是生活随笔為你收集整理的qcloud-python-sts 下载安装的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。