ericmandel / pyds9

Python connection to SAOimage DS9 via XPA
76 stars 41 forks source link

install problem - AttributeError: ext_map #46

Closed murison closed 7 years ago

murison commented 7 years ago

I just downloaded the latest greatest and unzipped it. I've never seen this before, Google is no help, and I'm stumped (anaconda python 3.5.2, Ubuntu 15.10) (exact same error if I instead go the 'pip install' route):

python setup.py install The requested path 'astropy_helpers' for importing astropy_helpers does not exist, or does not contain a copy of the astropy_helpers package. Downloading 'astropy-helpers'; run setup.py with the --offline option to force offline installation. /scr/bin/anaconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/setuptools/dist.py:331: UserWarning: Normalizing '1.9.dev' to '1.9.dev0' running install running bdist_egg running egg_info writing dependency_links to pyds9.egg-info/dependency_links.txt writing requirements to pyds9.egg-info/requires.txt writing top-level names to pyds9.egg-info/top_level.txt writing entry points to pyds9.egg-info/entrypoints.txt writing pyds9.egg-info/PKG-INFO reading manifest file 'pyds9.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching 'COPYING' warning: no files found matching '.c' under directory '.pyx' warning: no files found matching '.pxd' under directory '.pyx' warning: no files found matching '' under directory 'scripts' no previously-included directories found matching 'build' no previously-included directories found matching 'docs/build' no previously-included directories found matching 'docs/api' warning: no files found matching '' under directory 'astropy_helpers' warning: no previously-included files found matching 'astropy_helpers/.git' warning: no previously-included files found matching 'astropyhelpers/.gitignore' warning: no previously-included files matching '.pyc' found anywhere in distribution warning: no previously-included files matching '_.o' found anywhere in distribution writing manifest file 'pyds9.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py running build_ext running pre_hook from pyds9.setup_package for build_ext command pre_build_ext_hook command hook build_ext raised an exception: %s

Traceback (most recent call last): File "/home/murison/download/pyds9-master/.eggs/astropy_helpers-1.2-py3.5.egg/astropy_helpers/setup_helpers.py", line 285, in run_command_hooks hook_obj(cmd_obj) File "pyds9/setup_package.py", line 87, in pre_build_ext_hook libxpa = cmd.ext_map['pyds9.libxpa'] File "/scr/bin/anaconda3/lib/python3.5/site-packages/Cython/Distutils/build_ext.py", line 135, in getattr return _build_ext.build_ext.getattr(self, name) File "/scr/bin/anaconda3/lib/python3.5/distutils/cmd.py", line 103, in getattr raise AttributeError(attr) AttributeError: ext_map

ivvv commented 7 years ago

Same error for pyds9 version 1.9.dev0 with python 3.5.2 (Anaconda) on CentOS release 6.8 (Final) and on MacOSX 10.11.6.

No problems with v1.8.1.

montefra commented 7 years ago

Thank for the report. I don't usually use anaconda and I haven't seen this issue last time I tried to install pyds9 master into a python 2.7 or 3.5 virtual environment.

45 reports a similar problem on Windows with anaconda: this makes me think that there is something strange on anaconda.

I'll try to figure out what is going on here in the next few days.

In the meanwhile I suggest to use v1.8.1: it has the same functionalities but a different installation procedure and directory structure.

If you know how to use virtual environments, can you give a try to install in a clean one?

murison commented 7 years ago

"If you know how to use virtual environments, can you give a try to install in a clean one?"

Huh, that worked:

conda create -n test python=3 numpy astropy source activate test python setup.py install [...] Using /scr/bin/anaconda3/envs/test/lib/python3.5/site-packages Finished processing dependencies for pyds9==1.9.dev0

montefra commented 7 years ago

@murison : I started a project with the three issues on this: https://github.com/ericmandel/pyds9/projects/1

I've tested virtual and conda environment with and without cython and the problem seems to be cython.

I'll try to udpate astropy_helpers in use and if, it doesn't work, the astropy people.

montefra commented 7 years ago

Can you please tell me the version of Cython that makes the installation fail?

murison commented 7 years ago

Mine is Cython version 0.24.1

ivvv commented 7 years ago

Mine is 0.23.4

montefra commented 7 years ago

On my system PR #48 solves the problem. I'll merge the PR soon. However I want to setup Travis CI first at least to test installation.

If you want to test the installation, you can do it with:

pip install git+https://github.com/montefra/pyds9.git@install_cython#eggs=pyds9

murison commented 7 years ago

@montefra that worked for me! Thank you!

Is that an official fix that I can pass on to colleagues, or should I hold off on that for a bit?

montefra commented 7 years ago

@murison : thank you for testing and reporting. I hope that this will soon land in the trunk.

montefra commented 7 years ago

48 solves the issue