dub.json doesn't work for Windows, and a temp fix:
mw66 opened this issue · comments
mw66 commented
"preBuildCommands": [
"$${MATPLOTLIB_D_PYTHON:-python3} $PACKAGE_DIR/python/prebuild.py $PACKAGE_DIR"
],
dmd build fails:
The filename, directory name, or volume label syntax is incorrect.
Command failed with exit code 1: ${MATPLOTLIB_D_PYTHON:-python3} C:\Users...\AppData\Local\dub\packages\matplotlib-d-0.1.7\matplotlib-d/python/prebuild.py C:\Users...\AppData\Local\dub\packages\matplotlib-d-0.1.7\matplotlib-d
On windows, change it to:
"preBuildCommands": [
"C:\\ProgramData\\Anaconda3\\python.exe $PACKAGE_DIR/python/prebuild.py $PACKAGE_DIR"
],
worked.
TANI Kojiro commented
You need to modify PATH environment variable to include Anaconda directory. Anaconda does not do this by default.
Or, you can set MATPLOTLIB_D_PYTHON to C:\ProgramData\Anaconda3\python.exe instead, to avoid problems about modifing PATH.