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%"