Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #93652

Re: [setuptools] install data-file in users home-dir

Date 2015-07-10 20:33 +0200
From <c.buhtz@posteo.jp>
Subject Re: [setuptools] install data-file in users home-dir
References <3mSGXb0tfQzFpW3@dovecot04.posteo.de> <CAMw+j7+hUvj0-T4AoqG4X2RB6XUP4U0Unf=q2M8wT1_BEWKiZA@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.403.1436553247.3674.python-list@python.org> (permalink)

Show all headers | View raw


Hi Chris,

thank you for your answer.

On 2015-07-10 09:39 Chris Warrick <kwpolska@gmail.com> wrote:
> You should NEVER use sudo with pip.  Instead, use virtualenvs as a
> regular user, or create your own .deb packages.  

I am not sure, but maybe this is an Ubuntu-specific "problem"?
When I don't use sudo I got errors like this
"PermissionError: [Errno 13] Permission denied:
'/usr/local/lib/python3.4/dist-packages/SQLAlchemy-1.0.6.dist-info"

And it make sense for me.

Don't tell me about deb-Packages! :D I am stuck with that currently. I
would be glad to have a correct working whl-file for my local needs.
After that - maybe! - I will start again with thinking about a deb.

How can virtualenv help here? I need to install
python-software/packages to the system and not to a different
environment or sandbox.
I never used virtualenv but as I understand it it is for testing
purpose not for productive system.

> And you should not create the files in your install script.  Instead,
> install them to a different data dir (somewhere in 'share/appname'  

What do you mean with "data dir"? For a default config-file it could
be /etc/appname/default.conf. But I have no rights for that.

> should copy this file to user’s config directory (use pkg_resources to
> help you get it) if it does not exist yet.  

I will look at this package.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: [setuptools] install data-file in users home-dir <c.buhtz@posteo.jp> - 2015-07-10 20:33 +0200

csiph-web