Closed karinlag closed 8 years ago
Can you post the contents of .bash_profile
from your home directory?
Also, just so I'm clear, /c/Users/VI1452
is your home directory?
Ah, so based on your update your home is /h
?
If .bash_profile
isn't in /h
you can also look for it in /c/Users/VI1452
.
No .bash_profile in /h, but in /c/Users/VI1452:
VI1452@VIO9971 MINGW64 /c/Users/VI1452
$ cat .bash_profile
# Add paths for Software-Carpentry-installed scripts and executables
export PATH="$PATH:/c/Users/VI1452/.swc/lib/nano:/c/Users/VI1452/.swc/lib/sqlite
:/c/Users/VI1452/.swc/bin"
# Make nano the default editor
export EDITOR=nano
# Add paths for Software-Carpentry-installed scripts and executables
export PATH="$PATH:/c/Users/VI1452/.swc/lib/nano:/c/Users/VI1452/.swc/lib/sqlite
:/c/Users/VI1452/.swc/bin"
# Make nano the default editor
export EDITOR=nano
VI1452@VIO9971 MINGW64 /c/Users/VI1452
$
Just did echo $EDITOR, and nothing showed, so apparently this one wasn't being run. I sourced it, and can now get nano. A bit annoying but...
Suggestions on how to avoid having to have them do that?
Thanks, this is really helpful. So the issue, which is specific to your particular set up, is that the Windows Installer thinks that /c/Users/VI1452
is your home directory. This is standard home on Windows so it's putting the swc files there including the .bash_profile
. When you start your shell the shell identifies /h
as the home directory, so it looks in /h
for a .bash_profile
file, doesn't find one, and so doesn't add anything to the path.
If your students don't have this same special configuration then their installations will just work. If they do have this same configuration then the easiest thing is to have them move the .bash_profile
file into /h
.
Also, could you open up Python and run the following commands and post what they return:
os.environ['HOME']
os.path.expanduser('~')
We currently use the later to try to generically find the home directory, but it's clearly getting tripped up by your setup somehow.
First, moving the .bash_profile into /h and then restarting works.
Restarting without .bash_profile in / gives:
VI1452@VIO9971 MINGW64 ~
$ python
Python 2.7.10 |Anaconda 2.4.0 (64-bit)| (default, Oct 21 2015, 19:35:23) [MSC v.
1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import os
>>> os.environ['HOME']
'H:\\'
>>> os.path.expanduser('~')
'H:\\'
>>>
Note, I am leaving this computer now and won't have access to it until tomorrow at the same time, so further input from me won't occur until then.
Since os.path.expanduser('~')
is giving the right directory I'm not sure why everything is ending up in /c/Users/VI1452
. Did you install it as a different user, or with admin privileges, or something?
On 11/11/2015 5:09 PM, Ethan White wrote:
Since |os.path.expanduser('~')| is giving the right directory I'm not sure why everything is ending up in |/c/Users/VI1452|. Did you install it as a different user, or with admin privileges, or something?
I installed it with my own user, but I believe that my user has admin priviledge (not a native windowian, so hope I am understanding things correct).
karin
That should be fine, so I'm not really sure what we can do in terms of a general solution here. Since it hasn't come up before I'm inclined to consider this an exceptional case that we've managed to work around leave it at that.
@wking - any thoughts?
On Wed, Nov 11, 2015 at 08:09:15AM -0800, Ethan White wrote:
Since
os.path.expanduser('~')
is giving the right directory I'm not sure why everything is ending up in/c/Users/VI1452
.
Me neither. You can debug the install from a terminal with: — $ swc-windows-installer.py --verbose info
which will print the install locations (including the expanded ~/.bash_profile) as it runs. My guess is that this would install in /h. If the original install was with the Inno Setup installer, maybe the Inno Setup installer and shell are seeing different HOMEs? I'm not familiar enough with Windows to know how that could happen, but it's the only thing I can think of at the moment. Maybe the default home directory is something you pick when you install Git for Windows?
I'm getting a similar issue.
John@Bender MINGW64 ~
$ nano
Redirection is not supported.
Hi John - this is actually a different issue that results from how you installed git for Windows: https://github.com/swcarpentry/windows-installer/issues/31
If you reinstall git for Windows l following the current version of the installation instructions it should fix your problem.
On Saturday, November 14, 2015, JohnRMoreau notifications@github.com wrote:
I'm getting a similar issue.
John@Bender MINGW64 ~ $ nano
Redirection is not supported.
— Reply to this email directly or view it on GitHub https://github.com/swcarpentry/windows-installer/issues/32#issuecomment-156726733 .
Closing for now. If anyone else encounters this issue please feel free to reopen.
I'm seeing this one on one machine. No .bash_profile
in the home directory.
On Thu, Mar 31, 2016 at 11:10:19AM -0700, Ariel Rokem wrote:
I'm seeing this one on one machine. No
.bash_profile
in the home directory.
Do you also have disagreements about where the home directory is 1? If so, do you know why Bash thinks your home directory is in one place but the SWC Windows installer thinks it's somewhere else?
Sorry - seems like that was a false alarm. This participant had downloaded and installed the GitBash installer, but not the text editor installer.
A quick note to say that we ran into this problem during https://ejh243.github.io/2017-09-26-Exeter/ - windows laptops provided by the University had $HOME
in a different drive, but the files were in the c: drive. Moving .bashprofile
etc. worked.
I have installed things as described here;
http://swcarpentry.github.io/workshop-template/
This includes the installer.
I am now trying to run nano, but I get the following:
My path is:
Please note, my "home directory" (
$HOME
echos/h
) is here on a network drive. I am likely to teach from a machine that is configured the same way, so if this turns out to be the issue, I need directions to figure out how to install things elsewhere.