SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-4: truncated \xXX escape
I'm installing to c:\xampp\apache but keep getting 'SyntaxError: (unicode error)' i've tried '//' to solve it, but with the same result.
byte-compiling build\bdist.win-amd64\egg\mod_wsgi\server\apxs_config.py to apxs_config.cpython-311.pyc File "build\bdist.win-amd64\egg\mod_wsgi\server\apxs_config.py", line 15 BINDIR = 'C:\xampp\apache\bin' ^ SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-4: truncated \xXX escape
creating c:\python311\lib\site-packages\mod_wsgi-4.9.5.dev1-py3.11-win-amd64.egg Extracting mod_wsgi-4.9.5.dev1-py3.11-win-amd64.egg to c:\python311\lib\site-packages File "c:\python311\lib\site-packages\mod_wsgi-4.9.5.dev1-py3.11-win-amd64.egg\mod_wsgi\server\apxs_config.py", line 15 BINDIR = 'C:\xampp\apache\bin' ^ SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-4: truncated \xXX escape
But the scipt finished.
mod-wsgi 4.9.5.dev1 is already the active version in easy-install.pth Installing mod_wsgi-express-script.py script to C:\Python311\Scripts Installing mod_wsgi-express.exe script to C:\Python311\Scripts
Installed c:\python311\lib\site-packages\mod_wsgi-4.9.5.dev1-py3.11-win-amd64.egg Processing dependencies for mod-wsgi==4.9.5.dev1 Finished processing dependencies for mod-wsgi==4.9.5.dev1
any ideas on how to fix this
With what commands are you using to install it? You aren't supposed to use backslashes when setting MOD_WSGI_APACHE_ROOTDIR environment variable when installing it. The docs at https://pypi.org/project/mod-wsgi/ tell you this.
If you are on Windows and your Apache distribution is not installed into the directory C:/Apache24, first set the environment variable MOD_WSGI_APACHE_ROOTDIR to the directory containing the Apache distribution. Ensure you use forward slashes in the directory path. The directory path should not include path components with spaces in the name.
Also be aware that xampp distributions of Apache often don't work as they lack the required DLL import libraries needed when compiling the Apache module. That is a separate issue though. The ApacheLounge distribution of Apache is what is recommended.
Finally, where are you getting version 4.9.5.dev1 of mod_wsgi. That isn't coming from any official channel.