Skip to content

Env setup instructions not sufficient for Ubuntu 14.04 #58

Closed

Description

@eddie-dunn

Following the tutorial instructions will not work cleanly on Ubuntu 14.04; I encountered issues with both the virtual environment and the PostgreSQL setup instructions:

Virtualenv:

$ python3 -m venv venv
Error: Command '['/home/eddie/Slask/tmp/venv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1

PostgreSQL:

$ psql
psql: FATAL:  role "eddie" does not exist

I managed to solve the problems with some googling, but since this is supposed to be a very n00b-friendly guide, that should not be required.

The virtualenv-issue can be solved by installing python-virtualenv and then using the virtualenv-command instead of the command supplied in the tutorial. A fix for the problem is submitted upstream but I have no idea when it will trickle down to Trusty Tahr.

From what I can determine, the psql issue is due to the fact that, by default, only the user postgres has access to the PostgreSQL server by default. I solved it by adding myself as a PostgreSQL superuser, and editing some config files.

I can update the documentation to include the solutions to these issues. Would you like a pull request?

Activity

  1. oinopion commented on Jul 26, 2014

    @oinopion
    Contributor

    Hi Eddie,

    Thanks for your report.

    We're working actively on tutorial in this very moment.
    We've actually decided to get rid of PostgreSQL from initial tutorial and save it as a task for more advanced people.

    As for problem with venv... We can't use python-virtualenv, because this will work only on ubuntu and not on Mac and Windows. Could you tell me what Python version are you using by running python3 --version?

  2. eddie-dunn commented on Jul 26, 2014

    @eddie-dunn
    ContributorAuthor

    $ python3 --version

    Python 3.4.0
    

    However, the problem is not with the Python version I'm running, but rather with the way Debian/Ubuntu packages it. As I understand it, the tl;dr of the bug report I referenced above is that the Debian packaging rules don't support the bundling of pip with the Python3 package. So in other words, the module ensurepip is not available by default. As I said, there is a fix for this committed upstream, but nobody knows when it will come to Ubuntu 14.04. I think using virtualenv should be proposed as a temporary fix until then, as it's the easiest way to get around the problem that I found.

    I've been thinking about introducing our two summer interns to the Django Girls tutorial next week, so it would be nice if it worked with the current LTS version of Ubuntu by then :)

    BTW, I'm also at EuroPython, currently sitting next to the 'acab-streetlife' wall if you would rather discuss it in person (I'm not sure where you guys are sitting).

  3. oinopion commented on Jul 26, 2014

    @oinopion
    Contributor

    I could not find you. We're sitting in main sprints area, just by the window. Come and say "Hi" :-)

  4. oinopion commented on Jul 26, 2014

    @oinopion
    Contributor

    We'll add the python-virtualenv workaround to the tutorial. Would be really if we got pull request with this 😎

  5. eddie-dunn commented on Jul 26, 2014

    @eddie-dunn
    ContributorAuthor

    All right, cool. I'll send one soonish.

  6. eddie-dunn commented on Jul 26, 2014

    @eddie-dunn
    ContributorAuthor

    Sent pull request #66

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions