recentpopularlog in

kme : environmentvariable   12

windows - Run Python scripts in PowerShell directly - Super User
Edit the PATHEXT environment variable and add the .py extension.

Just add this line to your powershell profile:
<code class="language-powershell">$env:PATHEXT += ";.py"</code>

or you could just edit PATHEXT globally using the system settings (just start menu search for "Edit Environment variables for your account").


See https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles; the MS TechNet article linked in the approved answer is looooong dead.
python  powershell  windows  cli  commandline  pathext  path  environmentvariable  shellscripting  solution  essential  movein  configuration 
august 2019 by kme
open source - Gnome DIA change User Interface Language - Stack Overflow
Setting LANG=en_EN in the login environment might work, but on a Mac you can hard-code this into '/Applications/Dia.app/Contents/Resources/bin/dia' around line 137.
dia  environmentvariable  environment  language  locale  solution 
october 2016 by kme
git aliases causing "Permission denied" error - Stack Overflow
The correct answer to this was actually different. Before git runs the aliases it checks the $PATH. In case the directory does not exist, or lacks permissions, git produces the "fatal: cannot exec 'git-co': Permission denied". It does not ever comes to check the aliases so git foobar will produce the same error.

Good people from the git mailing list also reminded me of an strace tool, that can help finding the entry that is returning EACCES, as in: strace -f -e execve git foobar

The credit goes to Jeff King from the git mailing list. :)
git  git-alias  bizarre  path  environmentvariable  strace  linux  troubleshooting  solution 
june 2015 by kme
Python Library Path - Stack Overflow [http://stackoverflow.com/]
<blockquoteI> think you're looking for sys.path

import sys
print (sys.path)
python  dammitbrain  environmentvariable  librarypath  devel  solution 
february 2015 by kme
import .eps file problem OSX - Gimptalk - Premier Gimp Community [http://www.gimptalk.com/]
I found my success by editing the default.env file, found at "Gimp.app/lib/gimp/2.0/environ" and just adding the line "GS_PROG=/usr/local/bin/gs" after which I was able to open/import .eps files AND .pdf files as well, which I was not able to do before.
gimp  mac  osx  solution  eps  importexport  environmentvariable 
august 2014 by kme
administrator - Change environment variables as standard user (Windows 7) - Super User
Looking for a solution to set environment variables without having access to the System control panel in order to do this (http://stackoverflow.com/a/11763013) with Eclipse and EGit.
Just type “environment” into the start menu (or press Win+W in Windows 8 and search there). One option you are presented will be “Edit environment variables for your account”.

Similarly, searching for “environment” in the control panel yields that option, too.

Generally, I have noticed that simply searching for something in the start menu or control panel is much faster than trying to remember a series of icons, dialogs, etc. one has to access to find something. At least for the vast majority of tasks1.

A little digging yields that

rundll32 sysdm.cpl,EditEnvironmentVariables
is the command used to present that dialog. You can put a shortcut to that somewhere if you like.
windows  labcomputer  environmentvariable  eclipse  egit  solution 
may 2014 by kme
Is there any command line tool that can be used to edit environment variables in Windows? - Super User
Looking for a solution to set environment variables without having access to the System control panel in order to do this (http://stackoverflow.com/a/11763013) with Eclipse and EGit.
I don't know any tool that does this, but maybe you can use the regcommand:

reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v Path
to read the current path, and

reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v Path /d "newPath" /f
to write your new value.

You need admin rights for hsving right acccess in HKLM. If that is a problem, consider modifying the user specific path setting in HKCU\Environment instead.

Also interesting:
If you need a generic way to set any environment variable and have the changes persist, then setx.exe would be the tool to use. It cannot do the "smart" things you are asking for, though...

setx.exe is included with Windows Vista or later; if you use an earlier version of Windows, you can use the above download link to get it.
windows  registry  environmentvariable  labcomputer  nonadmin  cli  maybesolution  eclipse 
may 2014 by kme
CMake FAQ - KitwarePublic
I set a cmake variable in my environment, but it didn't change anything. Why?

CMake build settings are stored in the CMake cache corresponding to a project's build tree. They are called CMake "cache entries" and have no relation to your command shell's environment variables. Use a CMake GUI (CMakeSetup on Windows or ccmake on UNIX) or the wizard mode (cmake -i) to edit cache entries. Initial values may also be specified for a build by using the -D command line argument to cmake when it is first run to produce a new build tree.
cmake  solution  environmentvariable  compilerflags  cflags  cppflags  c  compiler 
may 2014 by kme

Copy this bookmark:





to read