learningequality / ka-lite

KA Lite: lightweight web server for serving core Khan Academy content (videos and exercises) without needing internet connectivity
https://learningequality.org/ka-lite/
Other
456 stars 306 forks source link

"setup script specifies an absolute path". Install failure on Arch Linux #5483

Closed nobicycle closed 6 years ago

nobicycle commented 7 years ago

Summary

Install failure on Arch Linux

System information

Please specify the KA Lite version you were using and your operating system!

Traceback or relevant snippet from server.log

$ sudo  python2 ./setup.py install
Already blocking...
Already blocking...
running install
running bdist_egg
running egg_info
writing requirements to ka_lite.egg-info/requires.txt
writing ka_lite.egg-info/PKG-INFO
writing top-level names to ka_lite.egg-info/top_level.txt
writing dependency_links to ka_lite.egg-info/dependency_links.txt
reading manifest file 'ka_lite.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*' found under directory 'kalite/static'
warning: no previously-included files matching '*' found under directory 'data/khan'
warning: no previously-included files matching '*pyc' found under directory 'python-packages'
warning: no files found matching '*' under directory 'dist-packages'
writing manifest file 'ka_lite.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
error: Error: setup script specifies an absolute path:

    /srv/kalite/kalitectl.py

setup() arguments must *always* be /-separated paths relative to the
setup.py directory, *never* absolute paths.

How to reproduce

  1. Extract kalite git master version
  2. sudo python2 ./setup.py install
benjaoming commented 7 years ago

Oh nice, I like Arch if that's their policy.. but just to check, could you state which version of pip and setuptools you're running?

$ pip --version
pip 9.0.1 from /blah/blah/site-packages (python 2.7)
̈́
AND:

$ pip show setuptools

Name: setuptools
Version: 36.0.1
Summary: Easily download, build, install, upgrade, and uninstall Python packages
Home-page: https://github.com/pypa/setuptools
Author: Python Packaging Authority
Author-email: distutils-sig@python.org
License: UNKNOWN
Location: /blah/blah/site-packages
Requires: 
nobicycle commented 7 years ago

]$ pip2 --version pip 9.0.1 from /usr/lib/python2.7/site-packages (python 2.7)

pip2 show setuptools Name: setuptools Version: 36.0.1 Summary: Easily download, build, install, upgrade, and uninstall Python packages Home-page: https://github.com/pypa/setuptools Author: Python Packaging Authority Author-email: distutils-sig@python.org License: UNKNOWN Location: /usr/lib/python2.7/site-packages Requires:

benjaoming commented 7 years ago

Hi @nobicycle

Thanks for the additional feedback!

You stated

Extract kalite git master version

...however reading the output:

error: Error: setup script specifies an absolute path:

    /srv/kalite/kalitectl.py

...suggests a file kalitectl.py is in play. We removed that file since 0.17.0 was released, so are you sure that you are installing a recent version?

nobicycle commented 6 years ago

Right! Somehow I was running 16.8 from github. Thanks very much