spacetelescope / imexam

imexam is a python tool for simple image examination, and plotting, with similar functionality to IRAF's imexamine
http://imexam.readthedocs.io
BSD 3-Clause "New" or "Revised" License
74 stars 45 forks source link

Couldn't even use imexam.connect #213

Open secretgardeninmyword opened 4 years ago

secretgardeninmyword commented 4 years ago

I have just install the imexam and xps. However, just running "imexam.connect()" went into trouble. Bellow is the traceback : /usr/lib64/python3.6/site-packages/imexam/connect.py:84: UserWarning: Unsupported viewer, check your installed packages

warnings.warn("**Unsupported viewer, check your installed " Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.6/site-packages/imexam/connect.py", line 86, in init raise NotImplementedError NotImplementedError

my original code is simple and list bellow:

import imexam imexam.connect()

I have already install ds9 but it still said "umsupported viewer". I find source code in ~/python3.6/site-packages/imexam/connect.py, it seems error in line 21--line 23: from . import imexamxpa have_xpa = True from .ds9_viewer import ds9 I find there is no file or function or class named imexamxpa. So what's the wrong? Have I loss some environment variable?

sosey commented 4 years ago

It looks like you are not using a virtual env, is that correct? Can you send me the following information?

What method did you use to install imexam The system you are on: uname -a The version of imexam that you have installed: imexam.__version__ The version of ds9 that you are using

thanks!

secretgardeninmyword commented 4 years ago

You are right, I am not using a virtual env. I use "pip install imexam" to install imexam. The system information is: Linux linux-tu83 5.3.18-lp152.20.7-default #1 SMP Mon Jun 29 14:58:38 UTC 2020 (2a0430f) x86_64 x86_64 x86_64 GNU/Linux The version of imexam is 0.9.1. The version of DS9 is 8.1

anghmpl commented 3 years ago

I have the same problem: My specifics are:

import matplotlib import numpy as np import matplotlib.pyplot as plt import os import sys sys.path sys.path.append('...python3.9/site-packages') # Path to imexam sys.path.append('/usr/local/bin') # path to ds9!
import imexam import xpa get_ipython().system = os.system # needed to run DS9 in the background !ds9& window=imexam.connect("DS9")

and here I get :

warnings.warn("Unsupported viewer, check your installed " 85 "packages\n") ---> 86 raise NotImplementedError

However, at this point, a DS9 window opened. In addition: Checking for DS9 windows with: imexam.list_active_ds9()
results in : AttributeError: module 'imexam' has no attribute 'list_active_ds9'