pytroll/aggdraw

pip install results in error Windows 10 21H1

TimElschner opened this issue · 4 comments

When I run the pip command it results in an error. Windows 10 latest version

C:\Users\Developer>pip install --no-cache-dir aggdraw
Collecting aggdraw
Downloading aggdraw-1.3.12.tar.gz (255 kB)
|████████████████████████████████| 255 kB 3.3 MB/s
Using legacy 'setup.py install' for aggdraw, since package 'wheel' is not installed.
Installing collected packages: aggdraw
Running setup.py install for aggdraw ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Developer\AppData\Local\Temp\pip-install-5bf0w6jo\aggdraw_ad2a8930b1fc4f7e8660a048aab41f75\setup.py'"'"'; file='"'"'C:\Users\Developer\AppData\Local\Temp\pip-install-5bf0w6jo\aggdraw_ad2a8930b1fc4f7e8660a048aab41f75\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Developer\AppData\Local\Temp\pip-record-5a4yao16\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\program files\python39\Include\aggdraw'
cwd: C:\Users\Developer\AppData\Local\Temp\pip-install-5bf0w6jo\aggdraw_ad2a8930b1fc4f7e8660a048aab41f75
Complete output (8 lines):
Trying freetype-config to find freetype library...
Using ctypes to find freetype library...
=== freetype found: 'C:\Program Files\AdoptOpenJDK\jdk-11.0.9.11-hotspot'
running install
running build
running build_ext
building 'aggdraw' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\program files\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Developer\AppData\Local\Temp\pip-install-5bf0w6jo\aggdraw_ad2a8930b1fc4f7e8660a048aab41f75\setup.py'"'"'; file='"'"'C:\Users\Developer\AppData\Local\Temp\pip-install-5bf0w6jo\aggdraw_ad2a8930b1fc4f7e8660a048aab41f75\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Developer\AppData\Local\Temp\pip-record-5a4yao16\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\program files\python39\Include\aggdraw' Check the logs for full command output.

Can you try installing the wheel package and then try reinstalling aggdraw? The error/warning message near the beginning makes it seem like it won't install the binary wheel package from PyPI because you don't have wheel installed. Otherwise, it is possible that we don't have wheels for Python 3.9. Checking...

Darn it, we don't have wheels for Python 3.9. The error you are getting is because we haven't had a release for a long time so the pre-compiled binary wheel is not available for Python 3.9. Pip is downloading the raw source files and trying to compile them, but your system does not have a C compiler. You will either need to downgrade to Python 3.8 or install the compiler it mentions or wait for us to have another release (which will likely not be any time soon). Or you could use conda and install the package from conda-forge.

thanks djhoese. I´ve installes Visual Studio Community 2019 to get the build tools with correct path settings etc.
now I was able to pip install, shall I close the issue?

Sounds good. Thanks. I'll close it now. If anyone reading this has similar issues in the future, but the proposed solutions don't work, please create a new issues.