Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Env setup instructions not sufficient for Ubuntu 14.04 #58

Closed
eddie-dunn opened this issue Jul 26, 2014 · 6 comments
Closed

Env setup instructions not sufficient for Ubuntu 14.04 #58

eddie-dunn opened this issue Jul 26, 2014 · 6 comments

Comments

@eddie-dunn
Copy link
Contributor

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?

@oinopion
Copy link
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?

@eddie-dunn
Copy link
Contributor Author

$ 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).

@oinopion
Copy link
Contributor

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

@oinopion
Copy link
Contributor

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

@eddie-dunn
Copy link
Contributor Author

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

@eddie-dunn
Copy link
Contributor Author

Sent pull request #66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants