You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Env setup instructions not sufficient for Ubuntu 14.04 #58
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?
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?
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).
Activity
oinopion commentedon Jul 26, 2014
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?eddie-dunn commentedon Jul 26, 2014
$ python3 --version
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
ensurepipis 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 usingvirtualenvshould 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).
oinopion commentedon Jul 26, 2014
I could not find you. We're sitting in main sprints area, just by the window. Come and say "Hi" :-)
oinopion commentedon Jul 26, 2014
We'll add the
python-virtualenvworkaround to the tutorial. Would be really if we got pull request with this 😎eddie-dunn commentedon Jul 26, 2014
All right, cool. I'll send one soonish.
eddie-dunn commentedon Jul 26, 2014
Sent pull request #66