ericmandel / pyds9

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

Installation trouble #32

Closed Choran18 closed 5 years ago

Choran18 commented 8 years ago

Hello,

I have run into a problem when trying to install pyds9. I have downloaded and unpacked the zip file and then ran the python setup.py install command from the pyds9 directory. When doing so I receive the following error: can't copy xpa\libxpa.dll : doesn't exist or not a regular file. I am using python 2.7 with the IDE spyder 2.3. Here is a copy of my command line:

C:\Users\Choran7\Desktop\pyds9-master\pyds9-master>python setup.py install C:\Users\Choran7\Documents\Anaconda\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'install_requires' warnings.warn(msg) running install running build running build_py "building XPA shared library ..." 'sh' is not recognized as an internal or external command, operable program or batch file. 'make' is not recognized as an internal or external command, operable program or batch file. 'make' is not recognized as an internal or external command, operable program or batch file. 'make' is not recognized as an internal or external command, operable program or batch file. 'rm' is not recognized as an internal or external command, operable program or batch file. running install_lib running install_data Installing data files to C:\Users\Choran7\Documents\Anaconda\Lib\site-packages\ error: can't copy 'xpa\libxpa.dll': doesn't exist or not a regular file Installing data files to C:\Users\Choran7\Documents\Anaconda\Lib\site-packages\ error: can't copy 'xpa\libxpa.dll': doesn't exist or not a regular file

Here is the link I downloaded: https://codeload.github.com/ericmandel/pyds9/zip/master

montefra commented 8 years ago

@ericmandel : do you have any suggestion for @Choran18 ?

ericmandel commented 8 years ago

@Choran18 @montefra Looking at setup.py, I see that we process a windows platform by assuming that mingw has been installed. The error messages about missing tools indicate that mingw is not available on that machine. So my first suggestion would be to install mingw, which is available here:

http://www.mingw.org/

I have not done a mingw install in a while, but its always been pretty easy. That should give you make, rm and sh (as well as gcc), all of which are currently missing.

That said, I don't understand where this error is coming from:

C:\Users\Choran7\Documents\Anaconda\lib\distutils\dist.py:267: UserWarning: Unknown distribution 

and that might still cause a problem.

montefra commented 8 years ago

I see. In the version I'm (slowly) working on in the develop branch, I use the astropy facilities to compile and install pyds9. I hope that that will help with portability.

ericmandel commented 8 years ago

@montefra Yes, it will be really good when Python can figure out how to do the build without needing external packages like mingw. But @Choran18, for now, try installing mingw and we'll help with problems as best we can.

Choran18 commented 8 years ago

@ericmandel I downloaded several of the MinGW packages including mingw32-base, mingw32-gcc-g++, mingw32-gcc-objc. I ran the command again and got the same error. Is there other packages from minGW that I need?

ericmandel commented 8 years ago

@Choran18 Sorry, it's been 3+ years since I looked at this, so I'm a bit rusty. You also have to install msys:

http://www.mingw.org/wiki/MSYS

in order to get make, sh, rm and the other tools that are being used by the build (see error message above).

montefra commented 8 years ago

@Choran18 : did you manage to install pyds9?

Yesterday I merged into master a new version of pyds9 that uses astropy facitilites for the installation. Would be great if you could test the installation on your windows machine.

lvyipeng commented 5 years ago

@montefra How to use astropy facilities for the installation of pyds9?