-
Notifications
You must be signed in to change notification settings - Fork 15
Description
I am using the jitcdde module in a fairly large system of ODE's and getting the following errors when running my code: "PermissionError: [WinError 5] Access is denied: ". I ran the jitcdde.test() and got the same error. I installed jitcdde using pip install jitcdde. I have run the MCVE in an administrator cmd and powershell. I have also tried in an anaconda environment. I can still run integrations, plot, and save the results but it leaves the temporary file behind and closes with the same WinError 5. Here is the MCVE:
import jitcdde
jitcdde.test()
The output is:
cl : Command line warning D9002 : ignoring unknown option '-fopenmp'
jitced.c
LINK : warning LNK4044: unrecognized option '/fopenmp'; ignored
Creating library C:\Users\me\AppData\Local\Temp\jitcxde_3xeacy8s\Release\Users\me\AppData\Local\Temp\jitcxde_3xeacy8s\jitced.cp312-win_amd64.lib and object C:\Users\me\AppData\Local\Temp\jitcxde_3xeacy8s\Release\Users\me\AppData\Local\Temp\jitcxde_3xeacy8s\jitced.cp312-win_amd64.exp
Generating code
Finished generating code
Traceback (most recent call last):
File "C:\Users\me\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 634, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\me\\AppData\\Local\\Temp\\jitcxde_3xeacy8s\\jitced.cp312-win_amd64.pyd'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\me\AppData\Local\Programs\Python\Python312\Lib\weakref.py", line 666, in _exitfunc
f()
File "C:\Users\me\AppData\Local\Programs\Python\Python312\Lib\weakref.py", line 590, in __call__
return info.func(*info.args, **(info.kwargs or {}))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\me\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 935, in _cleanup
cls._rmtree(name, ignore_errors=ignore_errors)
File "C:\Users\me\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 930, in _rmtree
_shutil.rmtree(name, onexc=onexc)
File "C:\Users\me\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 808, in rmtree
return _rmtree_unsafe(path, onexc)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\me\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 636, in _rmtree_unsafe
onexc(os.unlink, fullname, err)
File "C:\Users\me\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 905, in onexc
_os.unlink(path)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\me\\AppData\\Local\\Temp\\jitcxde_3xeacy8s\\jitced.cp312-win_amd64.pyd'
C:\Users\me\AppData\Roaming\Python\Python312\site-packages\jitcxde_common\_jitcxde.py:366: UserWarning: Could not delete temporary directory because of the following error:
[WinError 5] Access is denied: 'C:\\Users\\me\\AppData\\Local\\Temp\\jitcxde_3xeacy8s\\jitced.cp312-win_amd64.pyd'
warn(f"Could not delete temporary directory because of the following error:\n{error}")
The python version is 3.12.1
The jitcdde version is 1.8.1
I have also used jitcdde before on another computer and had no problems at all. I guess I have likely installed something wrong or am not running as an administrator somehow but I have no idea how to fix the issue since the exact same code is working fine on another laptop where the only obvious difference is that it is running python 3.10.4.
Thank you for any help!