initialcommit-com/git-sim

command not found: git-sim

eltoncezar opened this issue · 5 comments

Hi, I just installed git-sim on my Ubuntu 20.04.5, following the Quickstart guide, but when I try to run it, I get this error on the terminal:
command not found: git-sim.

How can I manually add git-sim to my path?

I also just installed this, but on Windows, and have basically the same problem from a command prompt:

git-sim is not recognized as an internal or external command, operable program or batch file.

Executing pip3 install git-sim a second time indicates that everything is already installed.

Hmm, I did set up automatic entry points that usually install the tool and then make sure it's available on the path, but not sure why it wouldn't be added in your cases.

I would suggest just manually adding the program to your path for now.

@eltoncezar For Ubuntu you can search for the path Git-Sim was installed using something like find / -name "git-sim"

When you find the path to the executable you can add it to your path by editing your .bash_profile add adding a line like:

if [ -d "$HOME/bin" ] ; then
 PATH="$PATH:$HOME/bin"
fi

See https://askubuntu.com/questions/60218/how-to-add-a-directory-to-the-path for details.

@ryanmcfall Can you also try searching for the location that the git-sim executable was installed and try adding it to your path environment variable? Then restart your terminal and try again.

@initialcommit-io I found git-sim.exe buried in %USERPROFILE%\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts.

It seems like pip is installing as a user package, even though I didn't specify the --user option. Maybe this is because I'm not running cmd.exe as an Administrator.

I also see Python itself is installed only for the logged in user, as its in %USERPROFILE\AppData\Local\Microsoft\WindowsApps\python.exe.

I can get git-sim to run now, but it would be nice to know why it did what it did.

Thanks for the quick reply @initialcommit-io. Funny thing is, I already had the path $HOME/.local/bin in my .bash_profile. I had to add it to /etc/environment also for it to work. Go figure.

@ryanmcfall Glad you got it working. I think you may be onto something based on the fact that cmd.exe was not run as admin. I'm not exactly sure how the git-sim entry point configuration (which happens on installation) handles different --user vs admin setups, and corresponding Python environments, on Windows. I think that would something useful for our Git-Sim documentation if you are able to shed some light on it. If not, no worries, but I'm glad you got it working.

@eltoncezar Haha interesting... Well glad you got it working too! This will be a nice reference if other folks run into the same issues.

Closing since Git-Sim is running for both of you after some path re-configuration.