astro-informatics / purify

Next-generation radio interferometric imaging.
https://astro-informatics.github.io/purify
GNU General Public License v2.0
16 stars 11 forks source link

Installation in CASA #25

Closed mdavezac closed 7 years ago

mdavezac commented 8 years ago

Danielle gets this error:

You are using pip version 7.0.3, however version 8.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting git+https://github.com/astro-informatics/purify.git
  Cloning https://github.com/astro-informatics/purify.git to /tmp/pip-cFE10E-build
Username for 'https://github.com': daniellefenech
Password for 'https://daniellefenech@github.com': 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-cFE10E-build/setup.py", line 345, in <module>
        long_description=long_description
      File "/usr/local/bin/CASA/casa-release-4.5.0-el6/lib/python2.7/distutils/core.py", line 112, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/local/bin/CASA/casa-release-4.5.0-el6/lib/python2.7/site-packages/setuptools/dist.py", line 265, in __init__
        self.fetch_build_eggs(attrs.pop('setup_requires'))
      File "/usr/local/bin/CASA/casa-release-4.5.0-el6/lib/python2.7/site-packages/setuptools/dist.py", line 289, in fetch_build_eggs
        parse_requirements(requires), installer=self.fetch_build_egg
      File "/usr/local/bin/CASA/casa-release-4.5.0-el6/lib/python2.7/site-packages/pkg_resources.py", line 631, in resolve
        requirements.extend(dist.requires(req.extras)[::-1])
      File "/usr/local/bin/CASA/casa-release-4.5.0-el6/lib/python2.7/site-packages/pkg_resources.py", line 2489, in requires
        dm = self._dep_map
      File "/usr/local/bin/CASA/casa-release-4.5.0-el6/lib/python2.7/site-packages/pkg_resources.py", line 2700, in _dep_map
        self.__dep_map = self._compute_dependencies()
      File "/usr/local/bin/CASA/casa-release-4.5.0-el6/lib/python2.7/site-packages/pkg_resources.py", line 2733, in _compute_dependencies
        common = frozenset(reqs_for_extra(None))
      File "/usr/local/bin/CASA/casa-release-4.5.0-el6/lib/python2.7/site-packages/pkg_resources.py", line 2730, in reqs_for_extra
        if req.marker_fn(override={'extra':extra}):
      File "/usr/local/bin/CASA/casa-release-4.5.0-el6/lib/python2.7/site-packages/_markerlib/markers.py", line 109, in marker_fn
        return eval(compiled_marker, environment)
      File "<environment marker>", line 1, in <module>
    NameError: name 'sys_platform' is not defined

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-cFE10E-build
  Out[10]: 1
dpshelio commented 8 years ago

@daniellefenech to solve this error you need to update setuptools from within casapy

from pip import main as pip
pip(['install', '--user', '--upgrade', 'setuptools'])

Could you check if that solution works on your end? I'm testing it with different environments (linux, mac) and configurations. I will update the documentation accordingly.

daniellefenech commented 8 years ago

Hi @dpshelio, I've tried doing the above, but I'm still getting the same error as posted when I try to install PURIFY.

dpshelio commented 8 years ago

@daniellefenech - is it exactly the same error? remember to quit and start casapy after installing setuptools, also, the above error message suggests you to upgrade pip too. So I would do:

from pip import main as pip
pip(['install', '--user', '--upgrade', 'pip'])

exit and start casapy again

from pip import main as pip
pip(['install', '--user', '--upgrade', 'setuptools'])

exit and start casapy again, and install purify.

I would expect you find a different error as I'm getting at the moment, while I'm trying to install it in a system without permissions... something (in the middle of all the traceback) like:

    /usr/bin/ld: cannot find -lpython2.7
    collect2: ld returned 1 exit status
daniellefenech commented 8 years ago

@dpshelio. Sorry I should have said, I updated pip already. When I tried the code above, I ran it as you suggested, then exited casapy and restarted and then ran the following code to install purify pip(['install', '--user','-b','/home/dmf/TEMP/','--no-use-wheel','git+https://github.com/astro-informatics/purify.git'])

and my output is the following:

Collecting git+https://github.com/astro-informatics/purify.git
  Cloning https://github.com/astro-informatics/purify.git to /tmp/pip-Dpcg8g-build
Username for 'https://github.com': daniellefenech
Password for 'https://daniellefenech@github.com': 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-Dpcg8g-build/setup.py", line 345, in <module>
        long_description=long_description
      File "/usr/local/bin/CASA/casa-release-4.5.0-el6/lib/python2.7/distutils/core.py", line 112, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/local/bin/CASA/casa-release-4.5.0-el6/lib/python2.7/site-packages/setuptools/dist.py", line 265, in __init__
        self.fetch_build_eggs(attrs.pop('setup_requires'))
      File "/usr/local/bin/CASA/casa-release-4.5.0-el6/lib/python2.7/site-packages/setuptools/dist.py", line 289, in fetch_build_eggs
        parse_requirements(requires), installer=self.fetch_build_egg
      File "/usr/local/bin/CASA/casa-release-4.5.0-el6/lib/python2.7/site-packages/pkg_resources.py", line 631, in resolve
        requirements.extend(dist.requires(req.extras)[::-1])
      File "/usr/local/bin/CASA/casa-release-4.5.0-el6/lib/python2.7/site-packages/pkg_resources.py", line 2489, in requires
        dm = self._dep_map
      File "/usr/local/bin/CASA/casa-release-4.5.0-el6/lib/python2.7/site-packages/pkg_resources.py", line 2700, in _dep_map
        self.__dep_map = self._compute_dependencies()
      File "/usr/local/bin/CASA/casa-release-4.5.0-el6/lib/python2.7/site-packages/pkg_resources.py", line 2733, in _compute_dependencies
        common = frozenset(reqs_for_extra(None))
      File "/usr/local/bin/CASA/casa-release-4.5.0-el6/lib/python2.7/site-packages/pkg_resources.py", line 2730, in reqs_for_extra
        if req.marker_fn(override={'extra':extra}):
      File "/usr/local/bin/CASA/casa-release-4.5.0-el6/lib/python2.7/site-packages/_markerlib/markers.py", line 109, in marker_fn
        return eval(compiled_marker, environment)
      File "<environment marker>", line 1, in <module>
    NameError: name 'sys_platform' is not defined

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-Dpcg8g-build
  Out[7]: 1

It's possible the error you get is related to the bit of the install to do with cython that I've told it not to do? I can have a try without the '--no-use-wheel' and see if that changes anything.

daniellefenech commented 8 years ago

Okay I tried that and I still get the same error.

mdavezac commented 7 years ago

Out of scope since we are removing the old python bindings.