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
Default home not writable, %HOME% does not help (windows) #970
Comments
It looks like we've changed the order of checks slightly. The code for
You can also override the location of the .ipython folder if you start it |
You can also set the environment variable |
Yes, IPYTHON_DIR does help. Could it be added to the windows installation documentation on the website Thanks. |
I don't think it's a Windows-specific issue, although it would be bizarre to have a non-writable home directory on a Unix-y system. It should be in the docs somewhere, though. |
On Mon, Nov 7, 2011 at 3:39 AM, Kuba Raczkowski
This is good feedback, thanks. What do you guys think, should we I'm +1 on that idea, but would be happy to reconsider if there's Cheers, f |
Fine by me, but I'm not familiar with how environment variables are typically used on Windows. Let's take it to the mailing list - maybe there was a reason it got changed in the first place. |
Yes, this has been brought up in #747 as well - I think HOME should be first priority when setting the homedir. Can I ask, is there a reason that we don't just use |
On Tue, Nov 8, 2011 at 8:20 PM, Min RK
OK, HOME first then. Agreed.
I don't really recall what |
It does almost exactly what we do, but in a different order, and notably excluding HOMESHARE. Unfortunately, based on Googling (many results being Brian trying to figure this out in the first place), it looks like cluster-users need to use HOMESHARE, because UNC paths should always be used there (with the wonderful contradiction that UNC paths must never be used for subprocesses). I think @ellisonbg put HOMESHARE first, because that's the only way to get some parallel things to work on clusters. The problem is, it's the wrong answer approximately everywhere else. Cluster users are necessarily more advanced than local users, so maybe they should not be prioritized at the expense of everyone else. If we fall back on os.path.expanduser('~'), then cluster users can trivially override the default with: I should also note that on first glance, I think the AvoidUNC shenanigans we have to do should be able to wrap os.system, just like they are used to wrap the subprocess. I do not believe that the two are coupled. |
I agree, esp. if it means we can simplify some of our code over there and fall back on more stdlib code for this... |
We have elaborate and fragile logic for determining home dir, and it is ultimately less reliable than the stdlib behavior used for `os.path.expanduser('~')`. This commit defers to that in all cases other than a bundled Python in py2exe/py2app environments. The one case where the default guess will *not* be correct, based on inline comments, is on WinHPC, where all paths must be UNC (`\\foo`), and thus HOMESHARE is the logical first choice. However, HOMESHARE is the wrong answer in approximately all other cases where it is defined, and the fix for WinHPC users is the trivial `HOME=%HOMESHARE%`. This removes the various tests of our Windows path resolution logic, which are no longer relevant. Further, $HOME is used by the stdlib as first priority on *all* platforms, so tests for this behavior are no longer posix-specific. closes ipythongh-970 closes ipythongh-747
We have elaborate and fragile logic for determining home dir, and it is ultimately less reliable than the stdlib behavior used for `os.path.expanduser('~')`. This commit defers to that in all cases other than a bundled Python in py2exe/py2app environments. The one case where the default guess will *not* be correct, based on inline comments, is on WinHPC, where all paths must be UNC (`\\foo`), and thus HOMESHARE is the logical first choice. However, HOMESHARE is the wrong answer in approximately all other cases where it is defined, and the fix for WinHPC users is the trivial `HOME=%HOMESHARE%`. This removes the various tests of our Windows path resolution logic, which are no longer relevant. Further, $HOME is used by the stdlib as first priority on *all* platforms, so tests for this behavior are no longer posix-specific. closes ipythongh-970 closes ipythongh-747
defer to stdlib os.path.expanduser('~') for path.get_home_dir() frozen env still comes first, and My Documents registry query is fallback on Windows, but in all normal cases, expanduser is used, which has $HOME as first priority. IPython also no longer considers finding no writable home dir as a fatal error. closes ipython#810 closes ipython#747 closes ipython#970
Hello, I have trouble with the new Ipython (I think I did not upgrade since 0.10) on windows. My default home directory is not writable (thanks admins!) so previously I had to setup HOME variable pointing to a better location. This, however, does not work with newer ipythons! Any idea why?
The text was updated successfully, but these errors were encountered: