[03:20:57] <bassface> has anyone ever seen an importerror for pip3? http://pastebin.com/tVFyxMZP
[03:21:10] <bassface> i've tried uninstalling/reinstalling python3 with brew
[03:27:23] <bassface> is there maybe another way to wipe out the pip3 installation?
[10:24:04] <skylite> Hi, I'm on ubuntu 12 and installed pip3. Could someone explain to me what do I need to chmod/chown so i dont have to use pip3 with sudo?
[10:25:34] <skylite> this is always a problem for me and I cant find any sollution
[11:10:57] <mgedmin> then virtualenv -p python3 ~/my-env
[11:11:04] <mgedmin> then ~/my-env/bin/pip install flask etc.
[11:15:02] <skylite> isnt virtualenv only for creating a dev environment?
[11:18:08] <mgedmin> it's for not cluttering your sytem-wide python installation with random packages
[11:19:56] <skylite> say I want to write a backupscript in python and for that I use some packages I create a virtualenv for that, write my code etc but if I want to actually run that system-wide, I still have to install the packages it requires system-wide?
[11:28:42] <mgedmin> then run the build which would create a virtualenv co-located in /opt/mysite with all the stuff
[11:28:58] <skylite> what do you mean make it runnable from a github repo?
[11:29:00] <mgedmin> and have a .wsgi script in /opt/mysite that activates the virtualenv before creating the wsgi app object
[11:29:31] <mgedmin> I mean 'git clone ..../myproject && cd myproject && make run' should work, as long as you've got all the necessary system packages
[11:30:02] <mgedmin> (python itself, make, a C compiler in case your project needs pypi packages with C extension modules, dev headers for those -- e.g. libxml/libjpeg etc for Pillow, ...)
[11:30:24] <mgedmin> 'make run' is an approximation
[11:30:24] <skylite> so the git repo should be basically a virtualenv?
[11:30:53] <skylite> I mean I create a virtualenv cd into it and git init...
[11:31:07] <mgedmin> they can share the directory, yes (.gitignore ignores virtualenv's bin/, lib/, local/, include/; a Makefile commited in git does 'virtualenv .' if it doesn't find a bin/pip)
[11:31:34] <mgedmin> e.g. https://github.com/mgedmin/ShoppingList
[11:31:48] <mgedmin> here's my makefile: https://github.com/mgedmin/ShoppingList/blob/master/Makefile
[11:32:20] <skylite> is the makefile created with pip freeze?
[11:32:24] <mgedmin> for production deployments I wouldn't use 'make run', I'd run 'make' to create the virtualenv and install all the requirements the have apache + mod_wsgi actually run the thing
[11:32:37] <mgedmin> requirements.txt is created with pip freeze, the Makefile I wrote by hand
[11:33:01] <mgedmin> (copying and pasting bits between my projects because it's hard to write one from scratch!)
[11:33:30] <mgedmin> this approach has certain downsides (running a build on the production server instead of building on jenkins and then deploying wheels) but I haven't had the time to improve it
[11:34:12] <mgedmin> the point is, if I need two different flask websites on the same server, and one of them needs some 3rd-party package X version 1.0, and the other requires X version 1.2, I don't get conflicts
[11:34:24] <mgedmin> which I would get if I installed everything into the system python
[13:27:08] <hynek> hi, is there anything I can do such that running https://github.com/hynek/structlog/blob/master/setup.py using `python setup.py test` doesn’t result in my home directory being polluted by .egg directories? Running tox leads to this beauty: http://i.glui.me/1v24Q01 if I install the deps using pip install directly, it doesn’t happen
[13:27:41] <doismellburning> skylite: it is essentially what I do
[13:27:43] <mgedmin> hynek, "don't use setup.py test" is the best I can offer :/
[13:27:57] <mgedmin> you can use python setup.py test in tox.ini iff you also specify all the test deps in tox.ini
[13:28:09] <mgedmin> then setup.py test will see that they all are already installed and won't clutter your $PWD
[13:28:30] <mgedmin> downside: you have to duplicate your test dependencies in setup.py and tox.ini because there's no API to extract test_requires from a setup.py
[13:28:33] <skylite> doismellburning so when you clone a repo you then create the virtualenv for it in .virtualenv and source that?
[13:28:38] <mgedmin> (this is why people hate setuptools)
[13:29:10] <doismellburning> skylite: I rarely source it, but yes