Azure / simdem

Tool for Simulating Demo's, delivering Tutorials and using documentation as tests.
MIT License
34 stars 17 forks source link

After installation SimDem command not found #99

Closed SorraTheOrc closed 6 years ago

SorraTheOrc commented 6 years ago

Trying to install and run Simdem 2. Getting "simdem: command not found"

Repro steps:

git checkout simdem2
pip3 install -r requirements.txt
pip3 install -v -e .

All confirmed as working via the output. But running SimDem does not work...

simdem docs/README.md
simdem: command not found
SorraTheOrc commented 6 years ago

Carefully reading the output of the install log I see:

Installing simdem script to /home/rgardler/.local/bin

Running simdem from there works:

/home/rgardler/.local/bin/simdem
usage: simdem [-h] [--debug] [--config-file CONFIG_FILE]
              [--mode {demo,dump,test,tutorial,cleanup}]
              [--parser {simdem1,ast}] [--executor {bash}] [--ui {basic}]
              [--setting setting]
              file
simdem: error: the following arguments are required: file

So it would seem I need to add ~/.local/bin to my path.

Is this intended behaviour? If so we need to document it.

lastcoolnameleft commented 6 years ago

Did you install using a --user flag or site.USER_BASE?

In my environment (OSX), it installed to /usr/local/bin.

# pip3 install --help
...
  --user                      Install to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%\Python on Windows. (See the Python documentation for site.USER_BASE for full
                              details.)
...
SorraTheOrc commented 6 years ago

I installed with the commands in the README:

git clone git@github.com:Azure/simdem.git
git checkout -b simdem2
pip3 install -r requirements.txt
pip3 install -v -e .

That is no --user

lastcoolnameleft commented 6 years ago

I did a brand new install of SimDem on a fresh Ubuntu image and did not encounter this issue.

# docker run -it python:3 /bin/bash
root@7589fa7ca8e2:/# git clone https://github.com/Azure/simdem.git
...
root@7589fa7ca8e2:/simdem# git checkout -b simdem2 remotes/origin/simdem2
# I need to fix that in the documentation since it checked out from the master branch by default.
...
root@7589fa7ca8e2:/simdem# pip3 install -r requirements.txt
...
root@7589fa7ca8e2:/simdem# pip3 install -v -e .
...
root@7589fa7ca8e2:/simdem# which simdem
/usr/local/bin/simdem

I assert that there is some pip.conf file somewhere that is overriding the default values of the location.

Can you check:$HOME/.pip/pip.conf, $HOME/.config/pip/pip.conf ?

If nothing else find / -name pip.conf

SorraTheOrc commented 6 years ago

No ~/.pip or ~/.config/pip Nothing turns up with find either. Ubuntu 16.04.

I can confirm that installing in a docker container as above works as documented.

Lets just document this by linking to this issue ( with something like "if you encounter simdem: command not found you might want to review issue #99 which contains a solution"

Once we document we can close this.