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

Update readme with information for users to install #34

Merged
merged 1 commit into from Apr 13, 2017

Conversation

blowekamp
Copy link
Member

No description provided.

@blowekamp
Copy link
Member Author

@zivy @thewtex
Are you able to follow the instruction to build and install SimpleITK from the github repo?

Thanks!

@thewtex
Copy link

thewtex commented Apr 10, 2017

@blowekamp Here is what I get:

[matt:~/bin] [simpleitk] % pip install git+https://github.com/SimpleITK/SimpleITKPythonPackage.git
Downloading/unpacking git+https://github.com/SimpleITK/SimpleITKPythonPackage.git
  Cloning https://github.com/SimpleITK/SimpleITKPythonPackage.git to /tmp/pip-YbsxNL-build
  Running setup.py (path:/tmp/pip-YbsxNL-build/setup.py) egg_info for package from git+https://github.com/SimpleITK/SimpleITKPythonPackage.git
    warning: no previously-included files matching '__pycache__' found under directory '*'
    warning: no previously-included files matching '*.py[co]' found under directory '*'

    Installed /tmp/pip-YbsxNL-build/scikit_build-0.6.0-py2.7.egg
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip-YbsxNL-build/setup.py", line 50, in <module>
        zip_safe=False
      File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
        _setup_distribution = dist = klass(attrs)
      File "/home/matt/bin/venvs/simpleitk/local/lib/python2.7/site-packages/setuptools/dist.py", line 262, in __init__
        self.fetch_build_eggs(attrs['setup_requires'])
      File "/home/matt/bin/venvs/simpleitk/local/lib/python2.7/site-packages/setuptools/dist.py", line 287, in fetch_build_eggs
        replace_conflicting=True,
      File "/home/matt/bin/venvs/simpleitk/local/lib/python2.7/site-packages/pkg_resources.py", line 631, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "/home/matt/bin/venvs/simpleitk/local/lib/python2.7/site-packages/pkg_resources.py", line 867, in best_match
        dist = working_set.find(req)
      File "/home/matt/bin/venvs/simpleitk/local/lib/python2.7/site-packages/pkg_resources.py", line 509, in find
        raise VersionConflict(dist, req)
    pkg_resources.VersionConflict: (setuptools 5.5.1 (/home/matt/bin/venvs/simpleitk/lib/python2.7/site-packages), Requirement.parse('setuptools>=28.0.0'))
    Complete output from command python setup.py egg_info:
    warning: no previously-included files matching '__pycache__' found under directory '*'

warning: no previously-included files matching '*.py[co]' found under directory '*'



Installed /tmp/pip-YbsxNL-build/scikit_build-0.6.0-py2.7.egg

Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip-YbsxNL-build/setup.py", line 50, in <module>

    zip_safe=False

  File "/usr/lib/python2.7/distutils/core.py", line 111, in setup

    _setup_distribution = dist = klass(attrs)

  File "/home/matt/bin/venvs/simpleitk/local/lib/python2.7/site-packages/setuptools/dist.py", line 262, in __init__

    self.fetch_build_eggs(attrs['setup_requires'])

  File "/home/matt/bin/venvs/simpleitk/local/lib/python2.7/site-packages/setuptools/dist.py", line 287, in fetch_build_eggs

    replace_conflicting=True,

  File "/home/matt/bin/venvs/simpleitk/local/lib/python2.7/site-packages/pkg_resources.py", line 631, in resolve

    dist = best[req.key] = env.best_match(req, ws, installer)

  File "/home/matt/bin/venvs/simpleitk/local/lib/python2.7/site-packages/pkg_resources.py", line 867, in best_match

    dist = working_set.find(req)

  File "/home/matt/bin/venvs/simpleitk/local/lib/python2.7/site-packages/pkg_resources.py", line 509, in find

    raise VersionConflict(dist, req)

pkg_resources.VersionConflict: (setuptools 5.5.1 (/home/matt/bin/venvs/simpleitk/lib/python2.7/site-packages), Requirement.parse('setuptools>=28.0.0'))

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-YbsxNL-build
Storing debug log for failure in /home/matt/.pip/pip.log

CC: @jcfr

@jcfr
Copy link
Collaborator

jcfr commented Apr 10, 2017

@thewtex Look like your system needs to be updated. setuptools 5.5.1 is from August 2014. See https://github.com/pypa/setuptools/releases/tag/5.5.1

@jcfr
Copy link
Collaborator

jcfr commented Apr 10, 2017

Based on the readme, setuptools >= 28.0.0 is needed.

@thewtex
Copy link

thewtex commented Apr 10, 2017

Ideally, the install command will identify that the setuptools version is too old and updates it.

If I upgrade it manually, I get:

[matt:~/bin] [simpleitk] 3s % pip install git+https://github.com/SimpleITK/SimpleITKPythonPackage.git
Downloading/unpacking git+https://github.com/SimpleITK/SimpleITKPythonPackage.git
  Cloning https://github.com/SimpleITK/SimpleITKPythonPackage.git to /tmp/pip-XstvvJ-build
  Running setup.py (path:/tmp/pip-XstvvJ-build/setup.py) egg_info for package from git+https://github.com/SimpleITK/SimpleITKPythonPackage.git
    warning: no previously-included files matching '__pycache__' found under directory '*'
    warning: no previously-included files matching '*.py[co]' found under directory '*'

    Installed /tmp/pip-XstvvJ-build/.eggs/scikit_build-0.6.0-py2.7.egg
    Searching for wheel>=0.29.0
    Reading https://pypi.python.org/simple/wheel/
    Downloading https://pypi.python.org/packages/a7/37/947b4329c4a3c72093b6c8e9b4be8c7f10c32dbb78848d3a234ce01c059d/wheel-0.30.0a0.tar.gz#md5=aa1145d48e4da2f9415eac2d51468a83
    Best match: wheel 0.30.0a0
    Processing wheel-0.30.0a0.tar.gz
    Writing /tmp/easy_install-NrdHft/wheel-0.30.0a0/setup.cfg
    Running wheel-0.30.0a0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-NrdHft/wheel-0.30.0a0/egg-dist-tmp-KBktA9
    /home/matt/bin/venvs/simpleitk/local/lib/python2.7/site-packages/setuptools/dist.py:334: UserWarning: Normalizing '0.30.0.a0' to '0.30.0a0'
      normalized_version,
    no previously-included directories found matching 'wheel/test/*/dist'
    no previously-included directories found matching 'wheel/test/*/build'
    Extracting wheel-0.30.0a0-py2.7.egg to /tmp/pip-XstvvJ-build/.eggs

    Installed /tmp/pip-XstvvJ-build/.eggs/wheel-0.30.0a0-py2.7.egg
    package init file 'SimpleITK/__init__.py' not found (or not a regular file)
Installing collected packages: SimpleITK
  Running setup.py install for SimpleITK
    package init file 'SimpleITK/__init__.py' not found (or not a regular file)
    warning: install_lib: 'build/lib.linux-x86_64-2.7' does not exist -- no Python modules to install

  Could not find .egg-info directory in install record for SimpleITK==1.0.0 from git+https://github.com/SimpleITK/SimpleITKPythonPackage.git
Successfully installed SimpleITK
Cleaning up...

@jcfr
Copy link
Collaborator

jcfr commented Apr 10, 2017

Ideally, the install command will identify that the setuptools version is too old and updates it

Agreed. May be the check at the top of setup.py could be simplified into something like it was done in ITK.

https://github.com/InsightSoftwareConsortium/ITKPythonPackage/blob/5eb56235f1628acd44737e50b1ce1adb5d725e40/setup.py#L4-L11

recent setuptools being a dependency of scikit-build. That should do it.

### Prerequisites

Building requires:
* [CMake](https://cmake.org)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pip install cmake should do it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

along with pip install ninja

README.md Outdated
SimpleITK can be compiled and install directly from the github repository:

```bash
pip install git+https://github.com/SimpleITK/SimpleITKPythonPackage.git
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to add -v .. the compilation being long, that will give some feedback.

@jcfr
Copy link
Collaborator

jcfr commented Apr 10, 2017

To summarize, I would recommend:

pip install cmake ninja scikit-build
pip install git+https://github.com/SimpleITK/SimpleITKPythonPackage.git -v

@blowekamp
Copy link
Member Author

Do they have python source distributions available for ninja and or cmake? If there are no SimpleITK binaries for a configuration, should be expect there be ones for ninja and cmake?

@blowekamp blowekamp force-pushed the AddDocumentationToInstall branch 2 times, most recently from cdf1af2 to 5f349ba Compare April 11, 2017 15:26
@blowekamp blowekamp merged commit 2857404 into SimpleITK:master Apr 13, 2017
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

Successfully merging this pull request may close these issues.

None yet

3 participants