Wordseer / wordseer

The WordSeer text analysis tool, written in Flask.
http://wordseer.berkeley.edu/
40 stars 16 forks source link

Babel installation issue? #33

Closed keien closed 10 years ago

keien commented 10 years ago

I was reorganizing my directory and needed to refresh my packages and ran into this while installing with pip install -r requirements.txt:

  Running setup.py install for Babel
    error: could not create '/usr/local/lib/python2.7/dist-packages/babel': Permission denied
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/home/keien/dev/wordseer_flask/build/Babel/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-cvIZoL-record/install-record.txt:
    running install

running build

running build_py

running install_lib

creating /usr/local/lib/python2.7/dist-packages/babel

error: could not create '/usr/local/lib/python2.7/dist-packages/babel': Permission denied

----------------------------------------

I definitely don't remember this happening before...

abendebury commented 10 years ago

Does this happen only for babel? It works for me.

keien commented 10 years ago

Not sure what's going on...I'm having other issues as well now. Can you check what version of Python your virtualenv is using?

I'm gonna take this opportunity to rework the requirements.txt - I think we should leave out the exact versions until we're ready for production, so that our code can be decently up to date. Also for the sake of clarity, instead of using the direct output from pip freeze, I'm just going to indicate the top-level packages that we use.

abendebury commented 10 years ago

2.7:

┌─[alyosha@alyosha_desktop]───────────────────────────────────────────[12:30:56]
└───[wordseer_flask]─[$]>>> virtualenv venv
New python executable in venv/bin/python2.7
Also creating executable in venv/bin/python
Installing setuptools, pip...done.
┌─[alyosha@alyosha_desktop]───────────────────────────────────────────[12:31:03]
└───[wordseer_flask]─[$]>>> source venv/bin/activate
(venv)┌─[alyosha@alyosha_desktop]───────────────────────────────────────────[12:31:14]
└───[wordseer_flask]─[$]>>> pip install -r requirements.txt 
Downloading/unpacking Babel==1.3 (from -r requirements.txt (line 1))
  Downloading Babel-1.3.tar.gz (3.4MB): 3.4MB downloaded
  Running setup.py (path:/home/alyosha/prog/wordseer_org/wordseer_flask/venv/build/Babel/setup.py) egg_info for package Babel

    warning: no previously-included files matching '*' found under directory 'docs/_build'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
Downloading/unpacking Flask==0.10.1 (from -r requirements.txt (line 2))
  Downloading Flask-0.10.1.tar.gz (544kB): 544kB downloaded
  Running setup.py (path:/home/alyosha/prog/wordseer_org/wordseer_flask/venv/build/Flask/setup.py) egg_info for package Flask

    warning: no files found matching '*' under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'examples'
    warning: no previously-included files matching '*.pyo' found under directory 'examples'
    no previously-included directories found matching 'docs/_build'
    no previously-included directories found matching 'docs/_themes/.git'
Downloading/unpacking Flask-Babel==0.9 (from -r requirements.txt (line 3))
  Downloading Flask-Babel-0.9.tar.gz
  Running setup.py (path:/home/alyosha/prog/wordseer_org/wordseer_flask/venv/build/Flask-Babel/setup.py) egg_info for package Flask-Babel

    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
    no previously-included directories found matching 'docs/_build'
    no previously-included directories found matching 'docs/_themes/.git'
...etc...

Leaving off the exact versions could result in tests failing when someone reinstalls packages with a different version from you, and debugging that could be difficult. I think if we would want to do that then the best way would be to remove versions from packages one by one when we are getting ready to release and see if they bring up unforeseen issues.

keien commented 10 years ago

Should also test Python 3?

I would think it makes sense for us to keep our packages updated while it's still a small team; whenever someone updates their packages and notices a version change in one of the packages, they can rerun tests, see if the update resulted in any issues, and notify everyone else. If we leave off updating packages until right before release, we'd have to deal with all the issues at once.

keien commented 10 years ago

Okay well apparently my computer is messing with me because I ran the installation again and this time it passed without any issues. Gonna close this but if you want to keep discussing the package issue we can do it in #11.