Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A small update suggestion in WinPython_Terminal.bat #1262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
EthanJYK opened this issue Sep 25, 2023 · 5 comments
Closed

A small update suggestion in WinPython_Terminal.bat #1262

EthanJYK opened this issue Sep 25, 2023 · 5 comments

Comments

@EthanJYK
Copy link

Recently I updated my winpython version to 3.10.11.1 but its Winpython Terminal didn't work.

And I found that's because a space is in my %USERPROFILE% where wt.exe located below so I added quotation marks at the line in scripts/WinPython_Terminal.bat and worked properly.

Maybe you could consider putting quotation marks in advance for upcoming releases.

scripts/WinPython_Terminal.bat line 4:
"%USERPROFILE%\AppData\Local\Microsoft\WindowsApps\wt.exe"

@EthanJYK EthanJYK changed the title A small update in WinPython_Terminal.bat A small update suggestion in WinPython_Terminal.bat Sep 25, 2023
@EthanJYK
Copy link
Author

And, you could also wrap all %PATH% variables with quotation marks in scripts/env.bat like:

echo ";"%PATH%";" | %FINDDIR%\find.exe /C /I ";%WINPYDIR%;" >nul
if %ERRORLEVEL% NEQ 0 (
set PATH="%WINPYDIR%\Lib\site-packages\PyQt5;%WINPYDIR%\Lib\site-packages\PySide2;%WINPYDIR%;%WINPYDIR%\DLLs;%WINPYDIR%\Scripts;%WINPYDIR%..\t;%WINPYDIR%..\t\Julia\bin;%WINPYDIR%..\n;"%PATH%";"
cd .
)

Now my chronic system path problems solved.

@stonebig
Copy link
Contributor

stonebig commented Sep 25, 2023

@echo off
call "%~dp0env_for_icons.bat"  %*
if not "%WINPYWORKDIR%"=="%WINPYWORKDIR1%" cd %WINPYWORKDIR1%
"%USERPROFILE%\AppData\Local\Microsoft\WindowsApps\wt.exe"
exit

the other one is more complex, so not feeling it

@EthanJYK
Copy link
Author

@stonebig I didn't write all detailes of the second one, but it's about another "spaces in user path" related problem. In my env, both powershell and command prompt returned "cannot find" errors for executables located in windows/system32, such as nvidia-smi.exe which is frequently used for cuda users. I didn't know the cause before I find the solution for WinPython_Terminal.bat. After replacing %PATH% with "%PATH%", problems were solved. like:

set PATH="%WINPYDIR%\Lib\site-packages\PyQt5;%WINPYDIR%\Lib\site-packages\PySide2;%WINPYDIR%;%WINPYDIR%\DLLs;%WINPYDIR%\Scripts;%WINPYDIR%..\t;%WINPYDIR%..\t\Julia\bin;%WINPYDIR%..\n;"%PATH%";"

@stonebig
Copy link
Contributor

I had build issues trying the code change, so reverted till further courage.

@RoyiAvital
Copy link

Since Windows Terminal can now be configured to be the default console on Windows 10 and Windows 11, I think this feature can be dropped at all.

If one install the latest Terminal, he can set his preferences on his own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants