Απέτυχε η κατασκευή τροχών για pycairo χρήση manim στην Python 3.7 περιβάλλον

ψήφοι
0

Είμαι ακολουθώντας τα βήματα που περιγράφονται εδώ για να ρυθμίσετε τα μαθηματικά animation για εκπαιδευτικούς σκοπούς. Είχα να καταλάβω πώς να ρυθμίσετε όλα τα βήματα για την Python 3.7, αλλά αυτό δεν έχει δημιουργήσει σημαντικά προβλήματα. Ωστόσο, είμαι τώρα τρέχει σε σφάλματα δεν μπορώ να καταλαβαίνω, το οποίο φαίνεται να προέρχεται από το πακέτο pycairo (έχω υπογράμμισε τα λάθη με έντονα γράμματα παρακάτω). Προσπάθησα ακολουθώντας τα βήματα που περιγράφονται εδώ για να διορθώσετε τα λάθη, αλλά αν και έχω εγκαταστήσει με επιτυχία το πιο πρόσφατο πακέτο pycairo (1,17), συνεχίζω να πάρει τα ίδια λάθη. Έχω κάποια εμπειρία προγραμματισμού, αλλά είμαι καινούργια σε Python, έτσι δεν είμαι σίγουρος πώς να επιλύσετε το πρόβλημα. Οποιαδήποτε βοήθεια θα εκτιμηθεί ιδιαίτερα.

Έχω δημοσιεύτηκε τον παρακάτω κώδικα (με έντονα γράμματα τα σφάλματα):

(manim37) C:\Users\a1689869\Anaconda3\manim>pip install -r requirements.txt

Requirement already satisfied: argparse==1.4.0 in c:\users\a1689869\anaconda3\envs\manim37\lib\site-packages (from -r requirements.txt (line 1)) (1.4.0)
Requirement already satisfied: colour==0.1.5 in c:\users\a1689869\anaconda3\envs\manim37\lib\site-packages (from -r requirements.txt (line 2)) (0.1.5)
Requirement already satisfied: numpy==1.15.0 in c:\users\a1689869\anaconda3\envs\manim37\lib\site-packages (from -r requirements.txt (line 3)) (1.15.0)
Requirement already satisfied: Pillow==5.2.0 in c:\users\a1689869\anaconda3\envs\manim37\lib\site-packages (from -r requirements.txt (line 4)) (5.2.0)
Requirement already satisfied: progressbar==2.5 in c:\users\a1689869\anaconda3\envs\manim37\lib\site-packages (from -r requirements.txt (line 5)) (2.5)
Requirement already satisfied: scipy==1.1.0 in c:\users\a1689869\anaconda3\envs\manim37\lib\site-packages (from -r requirements.txt (line 6)) (1.1.0)
Requirement already satisfied: tqdm==4.24.0 in c:\users\a1689869\anaconda3\envs\manim37\lib\site-packages (from -r requirements.txt (line 7)) (4.24.0)
Requirement already satisfied: opencv-python==3.4.2.17 in c:\users\a1689869\anaconda3\envs\manim37\lib\site-packages (from -r requirements.txt (line 8)) (3.4.2.17)
Collecting pycairo==1.17.1 (from -r requirements.txt (line 9))
  Using cached https://files.pythonhosted.org/packages/68/76/340ff847897296b2c8174dfa5a5ec3406e3ed783a2abac918cf326abad86/pycairo-1.17.1.tar.gz
Building wheels for collected packages: pycairo
  **Running setup.py bdist_wheel for pycairo ... error**
  Complete output from command c:\users\a1689869\anaconda3\envs\manim37\python.exe -u -c import setuptools, tokenize;__file__='C:\\Users\\a1689869\\AppData\\Local\\Temp\\pip-install-cicoey3g\\pycairo\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec')) bdist_wheel -d C:\Users\a1689869\AppData\Local\Temp\pip-wheel-29uyasfz --python-tag cp37:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.7
  creating build\lib.win-amd64-3.7\cairo
  copying cairo\__init__.py -> build\lib.win-amd64-3.7\cairo
  copying cairo\__init__.pyi -> build\lib.win-amd64-3.7\cairo
  copying cairo\py.typed -> build\lib.win-amd64-3.7\cairo
  running build_ext
  building 'cairo._cairo' extension
  creating build\temp.win-amd64-3.7
  creating build\temp.win-amd64-3.7\Release
  creating build\temp.win-amd64-3.7\Release\cairo
  C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=17 -DPYCAIRO_VERSION_MICRO=1 -Ic:\users\a1689869\anaconda3\envs\manim37\include -Ic:\users\a1689869\anaconda3\envs\manim37\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt -IC:\Program Files (x86)\Windows Kits\8.1\include\\shared -IC:\Program Files (x86)\Windows Kits\8.1\include\\um -IC:\Program Files (x86)\Windows Kits\8.1\include\\winrt -IC:\Program Files (x86)\Windows Kits\8.1\include\\cppwinrt /Tccairo/device.c /Fobuild\temp.win-amd64-3.7\Release\cairo/device.obj
  device.c
  **c:\users\a1689869\appdata\local\temp\pip-install-cicoey3g\pycairo\cairo\pycairo.h(37): fatal error C1083: Cannot open include file: 'cairo.h': No such file or directory**
  **error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.13.26128\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2**

  ----------------------------------------
  **Failed building wheel for pycairo
  Running setup.py clean for pycairo
Failed to build pycairo
Installing collected packages: pycairo
  Running setup.py install for pycairo ... error**
    Complete output from command c:\users\a1689869\anaconda3\envs\manim37\python.exe -u -c import setuptools, tokenize;__file__='C:\\Users\\a1689869\\AppData\\Local\\Temp\\pip-install-cicoey3g\\pycairo\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec')) install --record C:\Users\a1689869\AppData\Local\Temp\pip-record-ld4ke0sg\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.7
    creating build\lib.win-amd64-3.7\cairo
    copying cairo\__init__.py -> build\lib.win-amd64-3.7\cairo
    copying cairo\__init__.pyi -> build\lib.win-amd64-3.7\cairo
    copying cairo\py.typed -> build\lib.win-amd64-3.7\cairo
    running build_ext
    building 'cairo._cairo' extension
    creating build\temp.win-amd64-3.7
    creating build\temp.win-amd64-3.7\Release
    creating build\temp.win-amd64-3.7\Release\cairo
    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=17 -DPYCAIRO_VERSION_MICRO=1 -Ic:\users\a1689869\anaconda3\envs\manim37\include -Ic:\users\a1689869\anaconda3\envs\manim37\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt -IC:\Program Files (x86)\Windows Kits\8.1\include\\shared -IC:\Program Files (x86)\Windows Kits\8.1\include\\um -IC:\Program Files (x86)\Windows Kits\8.1\include\\winrt -IC:\Program Files (x86)\Windows Kits\8.1\include\\cppwinrt /Tccairo/device.c /Fobuild\temp.win-amd64-3.7\Release\cairo/device.obj
    device.c
    **c:\users\a1689869\appdata\local\temp\pip-install-cicoey3g\pycairo\cairo\pycairo.h(37): fatal error C1083: Cannot open include file: 'cairo.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.13.26128\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2**

    ----------------------------------------
Command c:\users\a1689869\anaconda3\envs\manim37\python.exe -u -c import setuptools, tokenize;__file__='C:\\Users\\a1689869\\AppData\\Local\\Temp\\pip-install-cicoey3g\\pycairo\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec')) install --record C:\Users\a1689869\AppData\Local\Temp\pip-record-ld4ke0sg\install-record.txt --single-version-externally-managed --compile failed with error code 1 in C:\Users\a1689869\AppData\Local\Temp\pip-install-cicoey3g\pycairo\
Δημοσιεύθηκε 20/10/2018 στις 12:49
πηγή χρήστη
Σε άλλες γλώσσες...                            

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more