Установка qPython в Win7

Будучи новичком в Python и KDB+/Q, я попытался установить пакет qPython (Python API для KDB+, а не быть ошибочно принятым за QPython).

  1. Я скачал и разархивировал исходный код с https://github.com/exxeleron/qPython/releases/tag/qPython-1.0-RC1

  2. В Win cmd я запустил python setup.py install (из пути, указанного в шаге 1 выше)

  3. Получен приведенный ниже журнал с ошибками.

Что он на самом деле говорит и как мне действовать?


Compiling qpython/fastutils.pyx because it changed.
Cythonizing qpython/fastutils.pyx
running install
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\qpython
copying qpython\qcollection.py -> build\lib.win-amd64-2.7\qpython
copying qpython\qconnection.py -> build\lib.win-amd64-2.7\qpython
copying qpython\qreader.py -> build\lib.win-amd64-2.7\qpython
copying qpython\qtemporal.py -> build\lib.win-amd64-2.7\qpython
copying qpython\qtype.py -> build\lib.win-amd64-2.7\qpython
copying qpython\qwriter.py -> build\lib.win-amd64-2.7\qpython
copying qpython\utils.py -> build\lib.win-amd64-2.7\qpython
copying qpython\_pandas.py -> build\lib.win-amd64-2.7\qpython
copying qpython\__init__.py -> build\lib.win-amd64-2.7\qpython
creating build\lib.win-amd64-2.7\samples
copying samples\async_query.py -> build\lib.win-amd64-2.7\samples
copying samples\console.py -> build\lib.win-amd64-2.7\samples
copying samples\publisher.py -> build\lib.win-amd64-2.7\samples
copying samples\sync_query.py -> build\lib.win-amd64-2.7\samples
copying samples\tick_subscriber.py -> build\lib.win-amd64-2.7\samples
copying samples\twistedclient.py -> build\lib.win-amd64-2.7\samples
copying samples\__init__.py -> build\lib.win-amd64-2.7\samples
copying LICENSE -> build\lib.win-amd64-2.7
copying CHANGELOG.txt -> build\lib.win-amd64-2.7
copying README.rst -> build\lib.win-amd64-2.7
copying requirements.txt -> build\lib.win-amd64-2.7
running build_ext
building 'qpython.fastutils' extension
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\qpython
G:\R\Rtools\gcc-4.6.3\bin\gcc.exe -DMS_WIN64 -mdll -O -Wall -IG:\Anaconda\lib\site-packages\numpy\core\include -IG:\Anaconda\include -IG:\Anaconda\PC -c qpython/fastutils.c -o build\temp.win-amd64-2.7\Release\qpython\fastutils.o
In file included from G:\Anaconda\lib\site-packages\numpy\core\include/numpy/ndarraytypes.h:1804:0, from G:\Anaconda\lib\site-packages\numpy\core\include/numpy/ndarrayobject.h:17, from G:\Anaconda\lib\site-packages\numpy\core\include/numpy/arrayobject.h:4, from qpython/fastutils.c:232: G:\Anaconda\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h:
12:9: note: #pragma message: G:\Anaconda\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
qpython/fastutils.c: In function '__Pyx_RaiseArgtupleInvalid':
qpython/fastutils.c:4376:18: warning: unknown conversion type character 'z' in format [-Wformat]
qpython/fastutils.c:4376:18: warning: format '%s' expects argument of type 'char*', but argument 5 has type 'Py_ssize_t' [-Wformat]
qpython/fastutils.c:4376:18: warning: unknown conversion type character 'z' in format [-Wformat]
qpython/fastutils.c:4376:18: warning: too many arguments for format [-Wformat-extra-args]
qpython/fastutils.c: In function '__Pyx_BufFmt_ProcessTypeChunk':
qpython/fastutils.c:4754:26: warning: unknown conversion type character 'z' in format [-Wformat]
qpython/fastutils.c:4754:26: warning: unknown conversion type character 'z' in format [-Wformat]
qpython/fastutils.c:4754:26: warning: too many arguments for format [-Wformat-extra-args]
qpython/fastutils.c:4806:20: warning: unknown conversion type character 'z' in format [-Wformat]
qpython/fastutils.c:4806:20: warning: unknown conversion type character 'z' in format [-Wformat]
qpython/fastutils.c:4806:20: warning: too many arguments for format [-Wformat-extra-args]
qpython/fastutils.c: In function '__pyx_buffmt_parse_array':
qpython/fastutils.c:4868:25: warning: unknown conversion type character 'z' in format [-Wformat]
qpython/fastutils.c:4868:25: warning: too many arguments for format [-Wformat-extra-args]
qpython/fastutils.c: In function '__Pyx_GetBufferAndValidate':
qpython/fastutils.c:5053:7: warning: unknown conversion type character 'z' in format [-Wformat]
qpython/fastutils.c:5053:7: warning: format '%s' expects argument of type 'char*', but argument 3 has type 'Py_ssize_t' [-Wformat]
qpython/fastutils.c:5053:7: warning: unknown conversion type character 'z' in format [-Wformat]
qpython/fastutils.c:5053:7: warning: too many arguments for format [-Wformat-extra-args]
qpython/fastutils.c: In function '__Pyx_RaiseTooManyValuesError':
qpython/fastutils.c:5413:18: warning: unknown conversion type character 'z' in format [-Wformat]
qpython/fastutils.c:5413:18: warning: too many arguments for format [-Wformat-extra-args]
qpython/fastutils.c: In function '__Pyx_RaiseNeedMoreValuesError':
qpython/fastutils.c:5419:18: warning: unknown conversion type character 'z' in format [-Wformat]
qpython/fastutils.c:5419:18: warning: format '%s' expects argument of type 'char*', but argument 3 has type 'Py_ssize_t' [-Wformat]
qpython/fastutils.c:5419:18: warning: too many arguments for format [-Wformat-extra-args]
qpython/fastutils.c: At top level: G:\Anaconda\lib\site-packages\numpy\core\include/numpy/__multiarray_api.h:1629:1: warning: '_import_array' defined but not used [-Wunused-function]
G:\Anaconda\lib\site-packages\numpy\core\include/numpy/__ufunc_api.h:241:1: warning: '_import_umath' defined but not used [-Wunused-function]
writing build\temp.win-amd64-2.7\Release\qpython\fastutils.def
G:\R\Rtools\gcc-4.6.3\bin\gcc.exe -DMS_WIN64 -shared -s build\temp.win-amd64-2.7\Release\qpython\fastutils.o build\temp.win-amd64-2.7\Release\qpython\fastutils.def -LG:\Anaconda\libs -LG:\Anaconda\PCbuild\amd64 -lpython27 -lmsvcr90 -o build\lib.win-amd64-2.7\qpython\fastutils.pyd
g:/r/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: skipping incompatible G:\Anaconda\libs/libpython27.a when searching for -lpython27
g:/r/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: skipping incompatible G:\Anaconda\libs/python27.lib when searching for -lpython27
g:/r/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: skipping incompatible G:\Anaconda\libs\libpython27.a when searching for -lpython27
g:/r/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: skipping incompatible G:\Anaconda\libs/libpython27.a when searching for -lpython27
g:/r/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: skipping incompatible G:\Anaconda\libs/python27.lib when searching for -lpython27
g:/r/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: skipping incompatible G:\Anaconda\libs\python27.lib when searching for -lpython27
g:/r/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lpython27
g:/r/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: skipping incompatible G:\Anaconda\libs/libmsvcr90.a when searching for -lmsvcr90
g:/r/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: skipping incompatible G:\Anaconda\libs\libmsvcr90.a when searching for -lmsvcr90
collect2: ld returned 1 exit status
error: command 'G:\\R\\Rtools\\gcc-4.6.3\\bin\\gcc.exe' failed with exit status 1

person Daniel Krizian    schedule 15.01.2015    source источник
comment
почему минус, не хочешь указать причину? Если это из-за большого журнала ошибок, посоветуйте, как сделать его более компактным/читабельным (я приложил усилия и исследовал способы).   -  person Daniel Krizian    schedule 16.01.2015
comment
Я не отрицаю, но могу предположить, что это потому, что этот тип вопроса не подходит для сайта. Лучше адресовать автору модуля или этому конкретному сообществу.   -  person jordanm    schedule 17.01.2015
comment
в системе установлен python 2.7?   -  person Manish Patel    schedule 17.01.2015
comment
@user2393012 user2393012 Я так думаю. Распространение анаконды   -  person Daniel Krizian    schedule 18.01.2015
comment
Последняя строка: \\gcc.exe' failed with exit status 1. Нужно ли мне также установить python-dev? (согласно этому SO thread )   -  person Daniel Krizian    schedule 18.01.2015


Ответы (2)


Похоже, это виновник:

g:/r/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lpython27

И да, я бы сказал, что вам нужно установить python-dev, чтобы получить библиотеки python27 для ссылки.

person Richard Green    schedule 22.01.2015
comment
На моем компьютере были установлены RTools. После того, как я его удалил, проблема исчезла. В RTools, похоже, были включены несовместимые gcc, и он маскировал другие gcc установки (например, как часть Visual Studio 2008). - person Daniel Krizian; 08.02.2015

Я установил qpython в Windows Vista, как показано ниже:

Загружен zip-файл с: https://github.com/exxeleron/qPython/archive/qPython-1.0-RC2.zip

разархивировал и выполнил в командной строке следующее:

python -m pip install -r requirements.txt

На этом этапе он выдал ошибку «Ошибка: требуется Microsoft Visual C++ 9.0 (не удалось найти vcvarsall.bat). Загрузите его с http://aka.ms/vcpython27"

Итак, скачал необходимый файл http://aka.ms/vcpython27 и установил его.

Снова выполняется: python -m pip install -r requirements.txt

На установку всех необходимых модулей для qpython ушло около 30 минут.

Пытался установить qpython с помощью:

python setup.py install

Получил ошибку: "ошибка: не удалось найти vcvarsall.bat".

Установил Visual Studio 2010 Express с: http://www.visualstudio.com/downloads/download-visual-studio-vs#d-2010-express

Установка заняла еще 30 минут.

Создана новая системная переменная среды с именем «VS90COMNTOOLS» и значением «C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\».

Наконец, qpython успешно установлен, выполнив команду (в новом окне dos):

python setup.py install
person Prasad DLV    schedule 10.02.2015