官术网_书友最值得收藏!

Installing Python on Windows

In order to be able to install the required OpenStack client tools under Windows, we must first prepare our Windows desktop machine with Python. The following applies to Windows 10.

Getting ready

Ensure that you are logged into your desktop and have the following installed:

How to do it…

Configuring your Windows environment can be achieved from Properties of your PC. Follow these instructions to ensure that Python is available in your system path, as well as set the appropriate environment variables under PowerShell:

  1. Navigate to the This PC icon on your desktop and choose Properties, as shown here:
    How to do it…
  2. Next, choose Advanced system settings from the menu on the left:
    How to do it…
  3. Now, select Environment Variables from the Advanced tab of the System Properties window, as shown here:
    How to do it…
  4. To set the path for Python, double-click on the Path entry as shown here:
    How to do it…
  5. Now add a New line to the path as shown as follows. We assume that you did a default installation of Python 2.7 and it is installed at C:\Python27:
    How to do it…
  6. Now click on OK. When you load up a PowerShell session, you should now be able to test that Python is working as expected, as shown here:
    How to do it…
  7. You should now be able to install the OpenStack clients as described in the next recipe.

How it works…

Configuring your Windows environment is a little more involved than it is for Unix/Linux environments. We first have to ensure that Python is set up properly, and available for use in a shell. We then to have a mechanism for loading environment variables into our shell, which isn't a native feature of Windows. We do this using a PowerShell script. However, because PowerShell is quite powerful, we have to remove a restriction to allow this to work. Once we have this all set up correctly, we are able to use the OpenStack environment from our Windows desktop.

主站蜘蛛池模板: 安吉县| 商都县| 祁东县| 石阡县| 霞浦县| 仁布县| 启东市| 保山市| 芒康县| 闽侯县| 柯坪县| 澜沧| 冀州市| 磴口县| 依安县| 德江县| 云霄县| 临漳县| 买车| 东乌珠穆沁旗| 苗栗县| 金湖县| 泊头市| 二连浩特市| 永丰县| 舟山市| 迁安市| 广水市| 镇坪县| 陆河县| 滨海县| 安仁县| 金塔县| 宜春市| 江达县| 陈巴尔虎旗| 灵山县| 班玛县| 新邵县| 崇州市| 德格县|