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

c.buhtz at posteo.jp c.buhtz at posteo.jp
Fri Jul 10 14:33:56 EDT 2015


Hi Chris,

thank you for your answer.

On 2015-07-10 09:39 Chris Warrick <kwpolska at 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.



More information about the Python-list mailing list