The WSL way
This is by far the easiest method:
- Install Ubuntu on WSL via the links and guides here
- Start the Ubuntu "program", and run
sudo apt install python3-openstackclient
- Carry on working as you're used to from a native Linux shell
The python way
This is a step-by-step guide to use the Openstack CLI CLI via native python-install on Windows. The following is tested on Windows 10 only. It will take you through installing all the dependencies.
Install prerequisites
The python-openstackclient needs some Microsoft C++ Build tools in order to be successfully installed
- Go to this link, and download Microsoft C++ Build Tools.
- Open the program and select Desktop Development with C++, but in the right hand menu, under optional, select only MSVC v142 - VS 2019 C++ x64/x86 build tools (latest) and Windows 10 SDK
- Do a little reflection around why MS forces you to install over 6GB of software do be able to compile some python modules...
Install Python for Windows
- Go to this link, and grab the latest Python 2 3 Release. Choose the Windows x86-64 MSI Installer, and install the package. Accept all the defaults. Do not change the installation path, install Python to
C:\Python27
- Right click on the start menu button, and select "System". In this window, click "Advanced system settings"
- In the System Properties window, select the Advanced tap, and click Environment Variables
- Now we need to create a new System variable, and then edit the System Variable "Path"
- Click "New" under the System variables box, and enter "PYTHON_HOME" and "C:\Python27" for name and value. Click OK.
- Locate the variable "Path", and click "Edit"
- Click "New" and add both "%PYTHON_HOME%\" and "%PYTHON_HOME%\Scripts\" to the list. Move them to the top of the list, and click "OK" in all the windows you've opened so far.
- Click "New" under the System variables box, and enter "PYTHON_HOME" and "C:\Python27" for name and value. Click OK.
...
- Check the Add Python 3.xx to PATH option, and select Customize Installation
- Select at least pip and the for all users (requires eleveation). The other options are just nice to have.
- Select Install for all users and Precompile standard library
Your Python for Windows installation is now ready for use.
Add user-specific python script directory to path
The installer does not add its script directory to the users PATH environment variable. This is recommended to do, to avoid problems later.
- Righ-click the windows-button and select System
- On the bottom of that page, select Advanced System Settings
- Select the advanced tab and click Environment variables
- Hilight Path in "User variables for <USERNAME>" and click Edit...
- Click New and enter
%APPDATA%\Python\Python310\Scripts
and click OK on all the windows that has appeared in this process.- NOTE: Make sure thar you use the Python version actually installed here. The example is valid for Python 3.10. If you i.e install 3.9 og 3.14, use "Python39" or "Python314" respecivley in the path.
Install python-openstackclient
...