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

UBUNTU 16 LTS install bug #59

Open
ppKrauss opened this issue Aug 20, 2017 · 5 comments
Open

UBUNTU 16 LTS install bug #59

ppKrauss opened this issue Aug 20, 2017 · 5 comments

Comments

@ppKrauss
Copy link

ppKrauss commented Aug 20, 2017

Using README instructions. After git clone, the python setup.py build shows

user@User:~/sandbox/odfpy$ python setup.py build
/usr/lib/python2.7/dist-packages/setuptools/dist.py:285: UserWarning: Normalizing '1.3.6dev' to '1.3.6.dev0'
  normalized_version,
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/odf
copying odf/manifest.py -> build/lib.linux-x86_64-2.7/odf
copying odf/grammar.py -> build/lib.linux-x86_64-2.7/odf
copying odf/presentation.py -> build/lib.linux-x86_64-2.7/odf
copying odf/dc.py -> build/lib.linux-x86_64-2.7/odf
....
changing mode of build/scripts-2.7/odfuserfield from 664 to 775
changing mode of build/scripts-2.7/xml2odf from 664 to 775

So, seems all fine... But python3 setup.py build

Traceback (most recent call last):
  File "setup.py", line 22, in <module>
    from setuptools import setup
ImportError: No module named 'setuptools'

It is a bug in the instructions or a bug at my UNUNTU...

@ppKrauss
Copy link
Author

The ideal is a correction at README (please NOTICE the bug there) or the source code... A workaround stackoverflow.com/a/14426553,
sudo apt-get install python3-setuptools.

@icemac
Copy link
Contributor

icemac commented Aug 22, 2017

As setuptools is used by setup.py it should be declared as install dependency.

@chfw
Copy link
Contributor

chfw commented Aug 22, 2017

How about having the following statement in the setup.py:

try:
    from setuptools import setup
except ImportError:
    from ez_setup import use_setuptools
    use_setuptools()
    from setuptools import setup

@icemac
Copy link
Contributor

icemac commented Aug 22, 2017

@chfw ez_setup needed be installed either, I thought of:

setup(
    ...
install_requires=['setuptools'],
    ...)

or even

setup(
    ...
setup_requires=['setuptools'],
    ...)

@chfw
Copy link
Contributor

chfw commented Aug 22, 2017

but setup comes from setuptools so I am afraid it does not help much. If setup is not found from ez_setup or setuptools, then the python environment itself needs additional work. Get python-pip onto it.

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

3 participants