Skip to content
This repository has been archived by the owner on Oct 21, 2021. It is now read-only.

How to install invoke #20

Open
frodrigo opened this issue Aug 27, 2019 · 7 comments
Open

How to install invoke #20

frodrigo opened this issue Aug 27, 2019 · 7 comments

Comments

@frodrigo
Copy link

The readme lacke information about of the setup the pipenv, enter it and how to install invoke and have the right version of it.

@antoine-de
Copy link
Contributor

hum those information are more related to pipenv than to this project and the setup of pipenv depends on your system, but if your on a recent debian sudo apt install pipenv should do the trick (or pip install --user pipenv if you prefer).

After this the command in the readme should be enough to install all dependencies and activate the virtual env and run the data import process:

pipenv run inv -f docker_settings.yaml load-in-docker-and-test

beware that it installs the dependencies only on the first run (it does not check that they are up to date if I remember correctly).

If you want to install them again, you only have to run pipenv install in the directory.

To enter the virtual env to run custom command you can do pipenv shell

@frodrigo
Copy link
Author

At least invoke is missing on the pipenv.

Sorry but I found easier to not use this project. At least on first try... propably caused by the usage of pipenv and invoke.

Maybe juste a Makefile can do the job. Look at OpenMapTiles, a Makefile and .sh to quick start de Makefile.

@antoine-de
Copy link
Contributor

hum I don't think invoke is missing: https://github.com/QwantResearch/docker_mimir/blob/master/Pipfile#L14

What exactly did you run?

For the Makefile+.sh, I guess it's a matter of habits, I personally hate writing bash 😜

@frodrigo
Copy link
Author

[fred@noir docker_mimir]$ pipenv --rm
Removing virtualenv (/home/fred/.local/share/virtualenvs/docker_mimir-dLDRjbQj)…

[fred@noir docker_mimir]$ pipenv run inv -f my_settings.yaml
Creating a virtualenv for this project…
Pipfile: /home/fred/docker_mimir/Pipfile
Using /usr/bin/python3.5m (3.5.7) to create virtualenv…
⠼ Creating virtual environment...Using base prefix '/usr'
New python executable in /home/fred/.local/share/virtualenvs/docker_mimir-dLDRjbQj/bin/python3.5m
Also creating executable in /home/fred/.local/share/virtualenvs/docker_mimir-dLDRjbQj/bin/python
Installing setuptools, pip, wheel...
done.
Running virtualenv with interpreter /usr/bin/python3.5m

✔ Successfully created virtual environment! 
Virtualenv location: /home/fred/.local/share/virtualenvs/docker_mimir-dLDRjbQj
Error: the command inv could not be found within PATH or Pipfile's [scripts].

[fred@noir docker_mimir]$ pipenv install invoke
Installing invoke…
Adding invoke to Pipfile's [packages]…
✔ Installation Succeeded 
Installing dependencies from Pipfile.lock (102016)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 3/3 — 00:00:03
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.

[fred@noir docker_mimir]$ pipenv run inv -f my_settings.yaml
INFO:root:importing admins from osm

@antoine-de
Copy link
Contributor

hum it's been a while since I used this project, maybe the first pipenv run does not install dependencies 🤔

Can you try the same commands but with pipenv install (to install all the requirements) instead of pipenv install invoke ?

@frodrigo
Copy link
Author

Yes, pipenv install then pipenv run works.

@antoine-de
Copy link
Contributor

sorry, my bad then, I thought the first pipenv run included the pipenv install 🤦‍♂

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants