[gpodder] Re: mygpo setup issues

  • From: Will S <wsha.code@xxxxxxxxx>
  • To: gpodder@xxxxxxxxxxxxx
  • Date: Fri, 9 Jun 2017 23:33:00 -0400

Hi Romain,

I didn't need to be root to install python packages. I installed
requirements.txt inside of a virtual environment, so I didn't use any
Python packages owned by the operating system. Regarding the secret key,
I'm not that familiar with it. I got an error about it at one point (maybe
the migrate step?) and just putting "SECRET_KEY=foo" before the command was
enough. Regarding PostgreSQL, I used this guide:
https://www.digitalocean.com/community/tutorials/how-to-use-postgresql-with-your-django-application-on-ubuntu-16-04
I didn't follow it exactly, but just used it to figure out how to install
Postgres and create a user and a databases (call them mygpo or change the
database entry in settings.py).

On Mon, Jun 5, 2017 at 6:33 AM, Romain Gontier <romaingontier@xxxxxxx>
wrote:

Hello Will

thank you for your help, it worked with python-memcached instead of
python3-memcached.

About the project and the fact that it's not maintained anymore, you may
be right because the last commit was done the last year and the support
page for gpodder.net closed about two months ago :
https://getsatisfaction.com/gpoddernet
Anyway when the setup will be complete, i'll try to reach Stefan Koegl in
order to ask him an update of these instructions.

Back to the instructions, they say to type this command

*pip install -r requirements.txt*

but if i don't get root access with sudo, i get an error about a denied
access. Was it the same for you too ?

*Installing collected packages: Babel, Pillow, Django, celery,
dj-database-url, django-redis-sessions, python-memcached, feedparser,
gunicorn, html2text, markdown2, oauth2client, psycopg2, pyes,
python-dateutil, redis, django-celery, requests, django-uuidfield, pytz,
kombu, billiard, httplib2, pyasn1, pyasn1-modules, rsa, six, amqp, anyjson*
*Cleaning up...*
*Exception:*
*Traceback (most recent call last):*
*  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122,
in main*
*    status = self.run(options, args)*
*  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line
283, in run*
*    requirement_set.install(install_options, global_options,
root=options.root_path)*
*  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1436, in
install*
*    requirement.install(install_options, global_options, *args, **kwargs)*
*  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 672, in
install*
*    self.move_wheel_files(self.source_dir, root=root)*
*  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 902, in
move_wheel_files*
*    pycompile=self.pycompile,*
*  File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 206, in
move_wheel_files*
*    clobber(source, lib_dir, True)*
*  File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 193, in
clobber*
*    os.makedirs(destsubdir)*
*  File "/usr/lib/python2.7/os.py", line 157, in makedirs*
*    mkdir(name, mode)*
*OSError: [Errno 13] Permission denied:
'/usr/local/lib/python2.7/dist-packages/babel'*


So with *"sudo pip install -r requirements.txt*", no more errors with
dependancies.
Now i'm stuck with the next step. (*"python manage.py migrate")*

I found one of your mail in the mailing list archives and you wrote this :

*"Also, the install instructions seem somewhat incomplete. They don't*
*mention creating a postgres database or using a SECRET_KEY variable*
*and it seems like both of those are necessary. Also, the instructions*
*recommend using settings_prod.py, and as far as I could tell that*
*file had no effect until I added "from mygpo.settings_prod import *"*
*to the bottom of settings.py."*

I would be interested to get the setup instructions for the database and
the secret_key please.
I got the information about the extra line inside settings.py, thanks for
the tip.

Have a good day.
Romain
Le 05/06/2017 à 03:12, Will S a écrit :

The problem you have is with python3-memcached which is a deprecated
project. Try changing it in requirements.txt to python-memcached which
supports both Python 2 and Python 3. In the past, python-memcached did not
support Python 3, so there was a separate package. The install instructions
don't go over setting up memcached, so I think it might not be necessary to
install this package any way unless you want to set it up yourself. It
seems like mygpo isn't really maintained these days as a public project.

On Sun, Jun 4, 2017 at 8:47 AM, Romain Gontier <romaingontier@xxxxxxx>
wrote:

Hello everybody

i'm following these instructions : https://github.com/gpodder/myg
po/blob/master/INSTALL.md in order to setup mygpo with linux mint 17.3
64bits (just for testing in localhost)

About Python and Postgresql :

*$ psql -V*
*psql (PostgreSQL) 9.3.10*

*$ python --version*
*Python 2.7.6*

Theses steps are allright :

*sudo apt-get install erlang git python-pip python-dev libevent-dev*
*sudo apt-get install libjpeg-dev zlib1g-dev libpng12-dev*
*git clone git://github.com/gpodder/mygpo.git
<http://github.com/gpodder/mygpo.git>*
*cd mygpo*

But this one encounters an error with python3-memcache dependency :

*pip install -r requirements.txt*

Here's the console log :





























































*Downloading/unpacking Babel==2.3.4 (from -r requirements.txt (line 1))
Downloading Babel-2.3.4-py2.py3-none-any.whl (7.1MB): 7.1MB downloaded
Downloading/unpacking Pillow==3.3.0 (from -r requirements.txt (line 2))
Downloading Pillow-3.3.0.zip (10.8MB): 10.8MB downloaded   Running setup.py
(path:/tmp/pip_build_romain/Pillow/setup.py) egg_info for package Pillow
        warning: no files found matching '*.sh'     no previously-included
directories found matching 'docs/_static'     warning: no
previously-included files found matching '.coveragerc'     warning: no
previously-included files found matching '.editorconfig'     warning: no
previously-included files found matching '.landscape.yaml'     warning: no
previously-included files found matching 'appveyor.yml'     warning: no
previously-included files found matching 'build_children.sh'     warning:
no previously-included files found matching 'tox.ini'     warning: no
previously-included files matching '.git*' found anywhere in distribution
    warning: no previously-included files matching '*.pyc' found anywhere
in distribution     warning: no previously-included files matching '*.so'
found anywhere in distribution Downloading/unpacking Django==1.9.8 (from -r
requirements.txt (line 3))   Downloading Django-1.9.8-py2.py3-none-any.whl
(6.6MB): 6.6MB downloaded Downloading/unpacking celery==3.1.23 (from -r
requirements.txt (line 4))   Downloading celery-3.1.23-py2.py3-none-any.whl
(520kB): 520kB downloaded Downloading/unpacking dj-database-url==0.4.1
(from -r requirements.txt (line 5))   Downloading
dj-database-url-0.4.1.tar.gz   Running setup.py
(path:/tmp/pip_build_romain/dj-database-url/setup.py) egg_info for package
dj-database-url     Downloading/unpacking django-redis-sessions==0.5.6
(from -r requirements.txt (line 6))   Downloading
django-redis-sessions-0.5.6.tar.gz   Running setup.py
(path:/tmp/pip_build_romain/django-redis-sessions/setup.py) egg_info for
package django-redis-sessions     Downloading/unpacking
python3-memcached==1.51 (from -r requirements.txt (line 7))   Downloading
python3-memcached-1.51.tar.gz   Running setup.py
(path:/tmp/pip_build_romain/python3-memcached/setup.py) egg_info for
package python3-memcached     Traceback (most recent call last):       File
"<string>", line 17, in <module>       File
"/tmp/pip_build_romain/python3-memcached/setup.py", line 4, in <module>
        import memcache       File "memcache.py", line 1251
print("Testing set/get {'%s': %s} ..." % (to_s(key), to_s(val)), end=' ')

^     SyntaxError: invalid syntax     Complete output from command python
setup.py egg_info:     Traceback (most recent call last):   File
"<string>", line 17, in <module>   File
"/tmp/pip_build_romain/python3-memcached/setup.py", line 4, in <module>
import memcache   File "memcache.py", line 1251     print("Testing set/get
{'%s': %s} ..." % (to_s(key), to_s(val)), end=' ')
                                                                        ^
SyntaxError: invalid syntax ----------------------------------------
Cleaning up... Command python setup.py egg_info failed with error code 1 in
/tmp/pip_build_romain/python3-memcached Storing debug log for failure in
/home/romain/.pip/pip.log*


Should i get python 3 packages too  ? I prefer to ask before adding
useless packages to my system.

Thanks a lot.
Romain





Other related posts: