Skip to content
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

Installation does not go according to documentation #1087

Closed
Serif-7 opened this issue Nov 19, 2020 · 3 comments
Closed

Installation does not go according to documentation #1087

Serif-7 opened this issue Nov 19, 2020 · 3 comments
Labels
support End user support

Comments

@Serif-7
Copy link

Serif-7 commented Nov 19, 2020

Support Request

Environment

  • Jrnl --diagnostic output: the issue is not with jrnl, but rather pipx
  • Install method: pipx

What are you trying to do?

Install jrnl easily.

What have you tried?

Installating jrnl works, but only after a massive headache. Here is how installing it works on a fresh Linux Mint 20 VM:

sudo apt install pipx

installing jrnl right after this fails, as it tells you you need python3-venv so that 'ensurepip' is available.

sudo apt install python3-venv

sudo pipx install jrnl
This will still fail as it reports an existing directory: Not installing to existing directory '/root/.local/pipx/venvs/jrnl'. pass '--force' to force installation.
sudo pipx install jrnl --force
Works, but tells you that the installed package is not on your PATH and says you need to manually modify your .bashrc or use 'ensurepath' (which does not add the correct folder. It adds /home/{user}/.local/bin instead).

So, in summary, pipx installs 'jrnl' in such a way that I have to manually modify my PATH to actually make it work like it should. I was unsure whether to label this as a Support Request, Documentation Change Request, or bug report.

Edit: I also have no idea where the config file is.

@Serif-7 Serif-7 added 🆕 New! support End user support labels Nov 19, 2020
@wren
Copy link
Member

wren commented Nov 20, 2020

Hi! Thank you for filing this issue, and I'm sorry installation gave you such a hard time.

Let's break up the various issues you've mentioned. It seems like there are 3, so I'll try to help with each one individually:
1. Installing pipx
We don't explicitly cover how to do this in our documentation (we link to pipx instead), and I can see why this might cause some confusion. If you look at pipx's instructions, they recommend using either brew or pip to install. It sounds like there's a listing on apt, but I'm not sure who manages that (do you know if it's from pipx or a third party?). It sounds like there's a problem with the apt formula though, and it's missing a dependency, so I would talk to whoever maintains that formula to get the python3-env dependency added.

If you install through either brew or pip, I think most of these issues should go away.

2. Installing jrnl via pipx
To install jrnl via pipx, you'll notice our docs say pipx install jrnl, and not sudo pipx install jrnl. I can understand the urge to run sudo when installing, because that's how some other package managers work (like apt), but pipx says not to do this in their docs.

From pipx's page about how installations work:

This automatically creates a virtual environment, installs the package, and adds the package's associated applications (entry points) to a location on your PATH. For example, pipx install pycowsay makes the pycowsay command available globally, but sandboxes the pycowsay package in its own virtual environment. pipx never needs to run as sudo to do this.

3. Path troubles
I think the path troubles are related to the use of sudo above. When you run sudo pipx install jrnl the installation will happen to the root directory because the root user is the one performing the installation. This is also why pipx ensurepath adds your user's path instead of the root one (I imagine sudo pipx ensurepath would add the root directory, but would do so to the root user and wouldn't help you very much)

So, I think if you go through the pipx installion guide, and then run pipx install jrnl by itself (no sudo), then the problems above should all go away. I do think these are good points for us to add as notes to our docs, though, to avoid this confusion for future users.

And bonus config file question: The default location of the config file is $XDG_CONFIG_HOME/jrnl/jrnl.yaml (or ~/.config/jrnl/jrnl.yaml if the xdg variable isn't set). You can always run jrnl --list (v2.5+) or jrnl -ls (<v2.5) to get a listing of all your journal files, and the config file.

Does that answer all of your questions?

@wren wren removed the 🆕 New! label Nov 20, 2020
@Serif-7
Copy link
Author

Serif-7 commented Nov 22, 2020

@wren Yep, installing pipx through pip3 fixed all my problems. Works perfect. Thank you for giving a detailed answer when just telling me to use pip would have worked.

I'm not sure if it's my fault for not following the pipx link in the docs, or the docs' for not specifying that I need to install pipx through pip. I though the link was there just to credit the project and assumed that there would be an apt package for it.

Anyway, thank you. I really appreciate the work that's gone into this project. It gives me such peace of mind having an easy and painless way to write down my thoughts with heavy encryption.

@wren
Copy link
Member

wren commented Nov 25, 2020

Thanks for the kind words! And I'm glad you're up and running now.

As for your question: if the docs aren't clear on something, it's always our fault. 😅

I'll make an issue to clarify this in our docs, and close this support one. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support End user support
Projects
None yet
Development

No branches or pull requests

2 participants