From d4954ec9b4c28c5b3739f03b25cdd789b6a45522 Mon Sep 17 00:00:00 2001 From: Dan Howe Date: Tue, 17 May 2022 10:03:14 +0200 Subject: [PATCH] Add 'anaconda-prompt.bat' --- anaconda-prompt.bat | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 anaconda-prompt.bat diff --git a/anaconda-prompt.bat b/anaconda-prompt.bat new file mode 100644 index 0000000..46c65f2 --- /dev/null +++ b/anaconda-prompt.bat @@ -0,0 +1,16 @@ +:: This script opens a prompt on AUTOCAD2 for running python scripts. + +:: It addresses the following problems: +:: - CMD can't run on UNC file paths. +:: - The system PATH environment variable on AUTOCAD2 points to an old Python. +:: - Installing anaconda for all users requires admin rights. + +:: Define python installation location +set PYTHONPATH=C:\Users\Public\Anaconda3 + +:: Mount current folder on network drive (CMD doesn't like UNC file paths) +cls +pushd %~dp0 + +:: Activate anaconda environment +%windir%\system32\cmd.exe /K ""%PYTHONPATH%\Scripts\activate.bat" "%PYTHONPATH%"