Windows 安装 python2.7

时间:2023-03-09 15:07:55
Windows 安装 python2.7

Windows 安装 python2.7

python2.7下载地址: https://www.python.org/downloads/release/python-2714/

安装过程:

Windows 安装 python2.7

Windows 安装 python2.7

Windows 安装 python2.7

Windows 安装 python2.7

设置系统环境变量

PYTHON_HOME = C:\Python27

PYTHONPATH = %PYTHON_HOME%\Lib;%PYTHON_HOME%\DLLs;%PYTHON_HOME%\Lib\lib-tk

在PATHEXT变量中追加 .PY;.PYM

在PATH变量中追加 %PYTHON_HOME%;%PYTHON_HOME%\Scripts;%PYTHON_HOME%\Doc

解压调试符号文件 python-2.7.14-pdb.zip 到指定目录

Windows 安装 python2.7

pywin32-221.win32-py2.7.exe

文件下载地址 https://sourceforge.net/projects/pywin32/files/pywin32/

Windows 安装 python2.7

Windows 安装 python2.7

Windows 安装 python2.7

Windows 安装 python2.7

VCForPython27.msi

文件下载地址 http://www.microsoft.com/en-us/download/details.aspx?id=44266

Windows 安装 python2.7

PTVS 2.1.1 VS 2012.msi

文件下载地址:https://github.com/Microsoft/PTVS/releases

Windows 安装 python2.7

Windows 安装 python2.7

Windows 安装 python2.7

VS2012 中自动识别到的配置

设置参考链接 https://docs.microsoft.com/en-us/visualstudio/python/python-environments#creating-an-environment-for-an-existing-interpreter

Windows 安装 python2.7

python2.7安装 pip,setuptools

1.下载https://bootstrap.pypa.io/ez_setup.py
python ez_setup.py #安装 setuptools

2.下载 https://raw.github.com/pypa/pip/master/contrib/get-pip.py
python get-pip.py install ##安装 pip

3. 安装完毕之后会在系统目录下生成Scripts目录,里面有 :
easy_install.exe 和 pip.exe 等可执行文件。

最好,把python和python2.7.5/Scripts添加到系统配置文件path属性值里。这样就可以直接执行了,安装完pip和easy_installer工具后,以后再安装python其他库就方便了

例:easy_install redis 或 pip install redis (推荐使用pip)

更新setuptools和pip

python -m pip install -U pip setuptools

使用Python2.7的安装工具pip,安装一些基础包。

cocos2d-x-2.2.6.zip
http://cocostudio.download.appget.cn/Cocos2D-X/cocos2d-x-2.2.6.zip

Windows 安装 python2.7

Windows 安装 python2.7

$ cocos luacompile -s src_dir -d dst_dir -e True -k string_of_key -b encrypt_sign
default key: 2dxLua default sign: XXTEA https://github.com/cocos2d/cocos2d-x/blob/v2/samples/Lua/TestLua/Classes/AppDelegate.cpp#L41
pStack->setXXTEAKeyAndSign("2dxLua", strlen("2dxLua"), "XXTEA", strlen("XXTEA"));
https://github.com/cocos2d/cocos2d-x/pull/9531/files
cocos/scripting/lua-bindings/script/cocos2d/Cocos2dConstants.lua
-----------------------------------------------------------
@@ -327,8 +327,11 @@ cc.KeyCodeKey =
"KEY_RETURN",
"KEY_CAPS_LOCK",
"KEY_SHIFT",
+ "KEY_RIGHT_SHIFT",
"KEY_CTRL",
+ "KEY_RIGHT_CTRL",
"KEY_ALT",
+ "KEY_RIGHT_ALT",
"KEY_MENU",
"KEY_HYPER",
"KEY_INSERT",
@@ -488,6 +491,9 @@ for k,v in ipairs(cc.KeyCodeKey) do
end cc.KeyCode.KEY_BACK = cc.KeyCode.KEY_ESCAPE
+cc.KeyCode.KEY_LEFT_SHIFT = cc.KeyCode.KEY_SHIFT
+cc.KeyCode.KEY_LEFT_CTRL = cc.KeyCode.KEY_CTRL
+cc.KeyCode.KEY_LEFT_ALT = cc.KeyCode.KEY_ALT
-----------------------------------------------------------

Windows 安装 python2.7

Windows 安装 python2.7

设置 TestCpp 为启动项目

Windows 安装 python2.7

点击F7开始生成解决方案:(在Release和Debug状态,都生成一次。)

Windows 安装 python2.7

Windows 安装 python2.7

使用create_project.py创建项目:

Windows 安装 python2.7

> .\create_project.py -project MyGame01 -package com.lsgx.mygame01 -language cpp

Windows 安装 python2.7

Windows 安装 python2.7

Windows 安装 python2.7

Windows 安装 python2.7

Windows 安装 python2.7