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

Add an option for "nikola plugin -i" to install dependencies in user's directory (corresponding to `pip install --user`) #2279

Closed
xuhdev opened this Issue Mar 4, 2016 · 9 comments

Comments

Projects
None yet
3 participants
@xuhdev
Member

xuhdev commented Mar 4, 2016

Currently it is hardcoded that pip is called to install everything in the global directory. It makes sense to allow users to install dependencies in their home directories.

@Kwpolska

This comment has been minimized.

Show comment
Hide comment
@Kwpolska

Kwpolska Mar 4, 2016

Member

👎. You should really be using a virtualenv.

Member

Kwpolska commented Mar 4, 2016

👎. You should really be using a virtualenv.

@xuhdev

This comment has been minimized.

Show comment
Hide comment
@xuhdev

xuhdev Mar 4, 2016

Member

@Kwpolska That's even better if nikola creates a virtual env for the site, for requirements by the plugins.

Member

xuhdev commented Mar 4, 2016

@Kwpolska That's even better if nikola creates a virtual env for the site, for requirements by the plugins.

@Kwpolska

This comment has been minimized.

Show comment
Hide comment
@Kwpolska

Kwpolska Mar 4, 2016

Member

No, we’re not doing that. You are supposed to take care of it yourself. Our Getting Started guide recommends virtualenvs, and we hope every user does that themselves.

Member

Kwpolska commented Mar 4, 2016

No, we’re not doing that. You are supposed to take care of it yourself. Our Getting Started guide recommends virtualenvs, and we hope every user does that themselves.

@Kwpolska Kwpolska added the wontfix label Mar 4, 2016

@Kwpolska Kwpolska closed this Mar 4, 2016

@ralsina

This comment has been minimized.

Show comment
Hide comment
@ralsina

ralsina Mar 4, 2016

Member

Hong: if you get things installed globally, that means you were running
"nikola plugin -i" as root. That's a much bigger issue :-)

On Fri, Mar 4, 2016 at 3:44 PM Chris Warrick notifications@github.com
wrote:

No, we’re not doing that. You are supposed to take care of it yourself.
Our Getting Started guide recommends virtualenvs, and we hope every user
does that themselves.


Reply to this email directly or view it on GitHub
#2279 (comment).

Member

ralsina commented Mar 4, 2016

Hong: if you get things installed globally, that means you were running
"nikola plugin -i" as root. That's a much bigger issue :-)

On Fri, Mar 4, 2016 at 3:44 PM Chris Warrick notifications@github.com
wrote:

No, we’re not doing that. You are supposed to take care of it yourself.
Our Getting Started guide recommends virtualenvs, and we hope every user
does that themselves.


Reply to this email directly or view it on GitHub
#2279 (comment).

@xuhdev

This comment has been minimized.

Show comment
Hide comment
@xuhdev

xuhdev Mar 4, 2016

Member

@ralsina You don't need to run it ad root; Nikola and its dependencies can be installed at home (via pip install --user), so it's global just for me. Its more convenient in this case, as I do not run multiple versions of Nikola and I frequently use Nikola.

Member

xuhdev commented Mar 4, 2016

@ralsina You don't need to run it ad root; Nikola and its dependencies can be installed at home (via pip install --user), so it's global just for me. Its more convenient in this case, as I do not run multiple versions of Nikola and I frequently use Nikola.

@ralsina

This comment has been minimized.

Show comment
Hide comment
@ralsina

ralsina Mar 4, 2016

Member

@xuhdev I mean, if you are not root, it will fail and tell you "go ahead and install dependencies yourself". It would be worse if it succeeded.

Member

ralsina commented Mar 4, 2016

@xuhdev I mean, if you are not root, it will fail and tell you "go ahead and install dependencies yourself". It would be worse if it succeeded.

@xuhdev

This comment has been minimized.

Show comment
Hide comment
@xuhdev

xuhdev Mar 4, 2016

Member

OK, maybe just being a little more clear on the message is good enough. I suggest

Contents of the requirements.txt file

to be changed to

Dependencies of the plugin listed in `/path/to/requirements.txt`:

when the installation of dependencies fail.

Member

xuhdev commented Mar 4, 2016

OK, maybe just being a little more clear on the message is good enough. I suggest

Contents of the requirements.txt file

to be changed to

Dependencies of the plugin listed in `/path/to/requirements.txt`:

when the installation of dependencies fail.

@Kwpolska

This comment has been minimized.

Show comment
Hide comment
@Kwpolska

Kwpolska Mar 5, 2016

Member

That’s not the full error message:

                LOGGER.error('Could not install the dependencies.')
                print('Contents of the requirements.txt file:\n')
                with io.open(reqpath, 'r', encoding='utf-8') as fh:
                    print(utils.indent(fh.read(), 4 * ' '))
                print('You have to install those yourself or through a '
                      'package manager.')
Member

Kwpolska commented Mar 5, 2016

That’s not the full error message:

                LOGGER.error('Could not install the dependencies.')
                print('Contents of the requirements.txt file:\n')
                with io.open(reqpath, 'r', encoding='utf-8') as fh:
                    print(utils.indent(fh.read(), 4 * ' '))
                print('You have to install those yourself or through a '
                      'package manager.')
@xuhdev

This comment has been minimized.

Show comment
Hide comment
@xuhdev

xuhdev Mar 5, 2016

Member

Right, I meant the part in the middle. Probably someone who does not use Python would be confused by what "requirements.txt" means.

Member

xuhdev commented Mar 5, 2016

Right, I meant the part in the middle. Probably someone who does not use Python would be confused by what "requirements.txt" means.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment