[英]Trouble installing python openstacksdk on Windows machine
我正在嘗試通過 PyCharm(在終端中使用 pip)安裝 python openstacksdk package,但我不斷收到以下錯誤消息。 我只發布了部分錯誤消息,如果需要我可以添加整個消息。 有什么想法嗎? 我使用的是 Windows 10 機器。
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\szadro200\PycharmProjects\opentstack_ck> pip install openstacksdk
Collecting openstacksdk
Using cached openstacksdk-0.61.0-py3-none-any.whl (1.4 MB)
Collecting jmespath>=0.9.0
Using cached jmespath-0.10.0-py2.py3-none-any.whl (24 kB)
Collecting jsonpatch!=1.20,>=1.16
Using cached jsonpatch-1.32-py2.py3-none-any.whl (12 kB)
Collecting keystoneauth1>=3.18.0
Using cached keystoneauth1-4.4.0-py3-none-any.whl (314 kB)
Requirement already satisfied: requestsexceptions>=1.2.0 in c:\users\szadro200\pycharmprojects\opentstack_ck\venv\lib\site-packages (from openstacksdk) (1.4.0)
Requirement already satisfied: decorator>=4.4.1 in c:\users\szadro200\pycharmprojects\opentstack_ck\venv\lib\site-packages (from openstacksdk) (5.1.1)
Collecting munch>=2.1.0
Using cached munch-2.5.0-py2.py3-none-any.whl (10 kB)
Requirement already satisfied: PyYAML>=3.13 in c:\users\szadro200\pycharmprojects\opentstack_ck\venv\lib\site-packages (from openstacksdk) (6.0)
Collecting cryptography>=2.7
Using cached cryptography-36.0.1-cp36-abi3-win_amd64.whl (2.2 MB)
Requirement already satisfied: iso8601>=0.1.11 in c:\users\szadro200\pycharmprojects\opentstack_ck\venv\lib\site-packages (from openstacksdk) (1.0.2)
Collecting netifaces>=0.10.4
Using cached netifaces-0.11.0.tar.gz (30 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: os-service-types>=1.7.0 in c:\users\szadro200\pycharmprojects\opentstack_ck\venv\lib\site-packages (from openstacksdk) (1.7.0)
Collecting appdirs>=1.3.0
Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Requirement already satisfied: pbr!=2.1.0,>=2.0.0 in c:\users\szadro200\pycharmprojects\opentstack_ck\venv\lib\site-packages (from openstacksdk) (5.8.1)
Collecting dogpile.cache>=0.6.5
Using cached dogpile.cache-1.1.5-py3-none-any.whl (51 kB)
Requirement already satisfied: cffi>=1.12 in c:\users\szadro200\pycharmprojects\opentstack_ck\venv\lib\site-packages (from cryptography>=2.7->openstacksdk) (1.15.0)
Requirement already satisfied: stevedore>=3.0.0 in c:\users\szadro200\pycharmprojects\opentstack_ck\venv\lib\site-packages (from dogpile.cache>=0.6.5->openstacksdk) (3.5.0)
Requirement already satisfied: jsonpointer>=1.9 in c:\users\szadro200\pycharmprojects\opentstack_ck\venv\lib\site-packages (from jsonpatch!=1.20,>=1.16->openstacksdk) (2.2)
Requirement already satisfied: requests>=2.14.2 in c:\users\szadro200\pycharmprojects\opentstack_ck\venv\lib\site-packages (from keystoneauth1>=3.18.0->openstacksdk) (2.27.1)
Requirement already satisfied: six>=1.10.0 in c:\users\szadro200\pycharmprojects\opentstack_ck\venv\lib\site-packages (from keystoneauth1>=3.18.0->openstacksdk) (1.16.0)
Requirement already satisfied: pycparser in c:\users\szadro200\pycharmprojects\opentstack_ck\venv\lib\site-packages (from cffi>=1.12->cryptography>=2.7->openstacksdk) (2.21)
Requirement already satisfied: idna<4,>=2.5 in c:\users\szadro200\pycharmprojects\opentstack_ck\venv\lib\site-packages (from requests>=2.14.2->keystoneauth1>=3.18.0->openstacksdk) (3.3)
Requirement already satisfied: charset-normalizer~=2.0.0 in c:\users\szadro200\pycharmprojects\opentstack_ck\venv\lib\site-packages (from requests>=2.14.2->keystoneauth1>=3.18.0->openstacksdk) (2.0.12)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\szadro200\pycharmprojects\opentstack_ck\venv\lib\site-packages (from requests>=2.14.2->keystoneauth1>=3.18.0->openstacksdk) (1.26.8)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\szadro200\pycharmprojects\opentstack_ck\venv\lib\site-packages (from requests>=2.14.2->keystoneauth1>=3.18.0->openstacksdk) (2021.10.8)
Building wheels for collected packages: netifaces
Building wheel for netifaces (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [11 lines of output]
running bdist_wheel
running build
running build_ext
building 'netifaces' extension
creating build
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DWIN32=1 -DNETIFACES_VERSION=0.11.0 -Ic:\users\szadro200\pycharmprojects\opentstack_ck\venv\include -IC:\Python\Python39\include -IC:\Python\Pyth
on39\Include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETF
XSDK\4.6.1\include\um" /Tcnetifaces.c /Fobuild\temp.win-amd64-3.9\Release\netifaces.obj
netifaces.c
c:\python\python39\include\pyconfig.h(200): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit code 2
[end of output]
當您使用 pycharm 時,您實際上並不需要使用 pip。只需轉到您的代碼和 go 到您鍵入“import openstacksdk”的行並單擊它,應該會出現一個紅色或黃色的燈泡圖標,單擊它: 然后點擊第一個選項。 導入 openstacksdk。 Pycharm會自動幫你下載庫!
當我嘗試通過 pip 安裝或 PyCharm 在 Python 中安裝 openstacksdk 時,我終於能夠解決我的問題。
我必須通過以下 url https://visualstudio.microsoft.com/visual-cpp-build-tools/安裝 Microsoft C++ 構建工具
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.