تؤدي محاولة تجميع kivy from source لي إلى الخطأ التالي:
cythoning .\kivy\graphics/svg.pyx to .\kivy\graphics\svg.c
Error compiling Cython file:
------------------------------------------------------------
...
end = time()
Logger.debug("Svg: Loaded {} in {:.2f}s".format(filename, end - start))
finally:
fd.close()
cdef void reload(self) except *:
^
------------------------------------------------------------
kivy\graphics\svg.pyx:469:9: 'reload' already defined
building 'kivy.graphics.svg' extension
C:\Python27\Scripts\gcc.exe -mdll -O -Wall -I.\kivy\include -IC:\Python27\include -I.\kivy\include -IC:\Python27\include -IC:\Python27\PC -c .\kivy\graphics\svg.c -o build\temp.win-amd64-2.7\Release\.\kivy\graphics\svg.o
.\kivy\graphics\svg.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
#error Do not use this file, it is the result of a failed Cython compilation.
^
error: command 'C:\\Python27\\Scripts\\gcc.exe' failed with exit status 1
أظن أن هذا مرتبط بهذا الالتزام: https://github.com/kivy/kivy/commit/ced5e6a7a6474b72722cef4e3470ed6bc58d1793. عندما أتحقق من الالتزام قبل ذلك ، يتم تجميعه بشكل صحيح.
هل يمكنك الإشارة إلى إصدار Cython الخاص بك أيضًا؟
التغيير برمجيا مع البيئة الخاصة بك، وهناك نستخدم Cython 0.25.2
. قد يكون لديك Cython قديم وقد يكون هذا التغيير فقط في الإصدار X للأمام.
تحرير: على الرغم من أن MinGW و MinGWPy مختلفان قليلاً ، فما هو الشيء الذي أفترضه أيضًا؟ حاول تثبيت الأخير باستخدام:
pip install -i https://pypi.anaconda.org/carlkl/simple mingwpy
شكرًا يا رفاق ، تم تجميعه بشكل صحيح باستخدام Cython 0.25! كنت أستخدم Cython 0.24. قد يكون من الجدير بالذكر في دليل التثبيت أن لدينا اعتمادًا شديدًا على Cython 0.25 الآن - تسرد صفحة التثبيت Cython 0.23 بالخط العريض: https://kivy.org/docs/installation/installation.html
sbrother شكرا لك. أنت تحفظ يومي.
التعليق الأكثر فائدة
شكرًا يا رفاق ، تم تجميعه بشكل صحيح باستخدام Cython 0.25! كنت أستخدم Cython 0.24. قد يكون من الجدير بالذكر في دليل التثبيت أن لدينا اعتمادًا شديدًا على Cython 0.25 الآن - تسرد صفحة التثبيت Cython 0.23 بالخط العريض: https://kivy.org/docs/installation/installation.html