Common Errors#
Windows Specific Errors#
Windows execution policy in PowerShell#
Some times a Windows setup has disabled default execution policies.
This happens when you find an error message looking like:
AuthorizationManager check failed. At line:1 char:1 + C:\scriptpath\scriptname.ps1 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : SecurityError: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccessOr, something similar (depending on versions etc.)
To enable execution do the following:
Open PowerShell in administrator mode: Search for
powershell
in the windows search barSelect
Run as administrator
Execute this code:
Set-ExecutionPolicy UnrestrictedImportant: Press A when asked (not Y)!
Restart any terminals (including VS Code) and try again.
Click here to get more information about execution policies.
ImportError: DLL load failed ...
#
When importing
dtumathtools
some Windows machines are missing certain libraries.The error can look similar to this:
ImportError: DLL load failed while importing _cext: The specified module could not be found
Click here and download (most likely) the X64 one.
Install the application
Re-start your editor (or machine) and try again If it still does not work, then try the X86 version.
If problems still occur, please write us at pythonsupport@dtu.dk
ERROR: Could not install packages due to an OSError: ...
#
The exact error message can look different depending on when you encounter this error. It happens because of a default limitation of 260 characters in file names.
The remedy is quite simple, download
this script
and double-click it.Now try to install the packages again.
Setting default terminal in VS code ( Windows )#
The default terminal in VS Code can be changed in the following way:
Open a terminal in VS Code
Next to the
+
icon select the downwards arrowClick
Choose the terminal, that you wish to have as your default (Windows PowerShell is recommended)