CNTK/bindings/python
Willi Richert f0428d3bf1 Bump version to 2.0.a3 2016-10-08 11:22:05 -07:00
..
cntk Require arguments to be list or dict; fix bug in string-based input evaluation 2016-10-08 12:26:56 +02:00
doc bindings/python/doc/concepts.rst: remove BOM 2016-10-07 13:59:37 +02:00
examples Remove explicit device setting; leave it as a comment for the user 2016-10-08 09:09:01 +02:00
build.bat bindings/python/cntk/: run SWIG from setup.py, move up cntk_py.i one level 2016-10-04 17:21:48 +02:00
conda-linux-cntk-py34-environment.yml bindings/python/cntk/conda-linux-cntk-py34-environment.yml: added 2016-09-28 17:59:12 +02:00
conda-windows-cntk-py34-environment.yml Add conda-windows-cntk-py34-environment.yml 2016-09-28 17:04:21 +02:00
readme.txt bindings/python/cntk/: run SWIG from setup.py, move up cntk_py.i one level 2016-10-04 17:21:48 +02:00
setup.py Bump version to 2.0.a3 2016-10-08 11:22:05 -07:00
swig_install.sh bindings/python/cntk/: run SWIG from setup.py, move up cntk_py.i one level 2016-10-04 17:21:48 +02:00
test.bat Fix example tests baselines 2016-10-05 14:37:30 +02:00

readme.txt

 This file contains step-by-step instructions on how to build the Python API for CNTK on Windows.

# no support yet for python 2.7
# recommended python version is 3.4 (with numpy & scipy)
# supported platform: 64 bit

# Set up compiler and its variant

call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall" amd64

set MSSdk=1
set DISTUTILS_USE_SDK=1

# Make sure swig.exe is in your path. For example, if SWIG is installed to c:\local\swigwin-3.0.10, run the following:

set PATH=c:\local\swigwin-3.0.10;%PATH%

# a) If you are just building to use it locally:
    # Build -> generate .pyd

    # 1) Run the following:
    python .\setup.py build_ext --inplace --force

    # 2) add to PATH the path to CNTK dlls (e.g. in ..\..\x64\Release)
        set PATH=%CD%\..\..\x64\Release;%PATH%
    # 3) Add to PYTHONPATH the local path and the path to the Python examples
        set PYTHONPATH=%CD%;%CD%\examples;%PYTHONPATH%
    # 4) test by running any of the examples or running py.test from inside the cntk\tests or cntk\ops\tests directories.

# b) If you want to package it:
    # 1) install the following:
    pip install twine wheel

    # 2) Run the following (note: --inplace not required when packaging):
    python .\setup.py build_ext bdist_wheel

    # 3) put the wheel file on some http server

    # 4) from your machine, run pip install
    pip install http://your-url:your-port/cntk-0.0.0-cp34-cp34m-win_amd64.whl

    # 5) check that it is loaded correctly
    python
    >>> import cntk
    
    # 6) Running examples:
        # Clone the python examples folder from the CNTK repository and add its path to PYTHONPATH    
        # (e.g. setx PYTHONPATH %PYTHONPATH%;C:\work\cntk\bindings\python\examples in an Admin shell,
        # or rather setx PYTHONPATH C:\work\cntk\bindings\python\examples if no PYTHONPATH defined yet).
        # Try to run any of the examples, some examples come up with a script that fetches and prepares the data,
        # other examples use data files that are checked in inside the cntk repository.