neuromorphicsystems / astrometry

Astrometry turns a list of star positions into a pixel-to-sky transformation (WCS)
GNU General Public License v3.0
27 stars 3 forks source link

Can't pip install on Windows #3

Open retroexpress opened 1 year ago

retroexpress commented 1 year ago

Hello,

I've been trying to install using pip on Windows 10 and 11 in both Python 3.8 and 3.10 on multiple machines but encounter the following error due to paths specified in SOURCES.txt:

Collecting astrometry Downloading astrometry-4.1.1.tar.gz (497 kB) ---------------------------------------- 497.7/497.7 kB 5.2 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [47 lines of output] running egg_info writing astrometry.egg-info\PKG-INFO writing dependency_links to astrometry.egg-info\dependency_links.txt writing requirements to astrometry.egg-info\requires.txt writing top-level names to astrometry.egg-info\top_level.txt reading manifest file 'astrometry.egg-info\SOURCES.txt' Traceback (most recent call last): File "C:\Users\QKDeathStar\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main() File "C:\Users\QKDeathStar\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main json_out['return_val'] = hook(hook_input['kwargs']) File "C:\Users\QKDeathStar\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) File "C:\Users\QKDeathStar\AppData\Local\Temp\pip-build-env-c9wbj36t\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) File "C:\Users\QKDeathStar\AppData\Local\Temp\pip-build-env-c9wbj36t\overlay\Lib\site-packages\setuptools\build_meta.py", line 323, in _get_build_requires self.run_setup() File "C:\Users\QKDeathStar\AppData\Local\Temp\pip-build-env-c9wbj36t\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup exec(code, locals()) File "", line 250, in File "C:\Users\QKDeathStar\AppData\Local\Temp\pip-build-env-c9wbj36t\overlay\Lib\site-packages\setuptools__init__.py", line 107, in setup return distutils.core.setup(attrs) File "C:\Users\QKDeathStar\AppData\Local\Temp\pip-build-env-c9wbj36t\overlay\Lib\site-packages\setuptools_distutils\core.py", line 185, in setup return run_commands(dist) File "C:\Users\QKDeathStar\AppData\Local\Temp\pip-build-env-c9wbj36t\overlay\Lib\site-packages\setuptools_distutils\core.py", line 201, in run_commands dist.run_commands() File "C:\Users\QKDeathStar\AppData\Local\Temp\pip-build-env-c9wbj36t\overlay\Lib\site-packages\setuptools_distutils\dist.py", line 969, in run_commands self.run_command(cmd) File "C:\Users\QKDeathStar\AppData\Local\Temp\pip-build-env-c9wbj36t\overlay\Lib\site-packages\setuptools\dist.py", line 1244, in run_command super().run_command(command) File "C:\Users\QKDeathStar\AppData\Local\Temp\pip-build-env-c9wbj36t\overlay\Lib\site-packages\setuptools_distutils\dist.py", line 988, in run_command cmd_obj.run() File "C:\Users\QKDeathStar\AppData\Local\Temp\pip-build-env-c9wbj36t\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 317, in run self.find_sources() File "C:\Users\QKDeathStar\AppData\Local\Temp\pip-build-env-c9wbj36t\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 325, in find_sources mm.run() File "C:\Users\QKDeathStar\AppData\Local\Temp\pip-build-env-c9wbj36t\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 573, in run self.add_defaults() File "C:\Users\QKDeathStar\AppData\Local\Temp\pip-build-env-c9wbj36t\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 618, in add_defaults self.read_manifest() File "C:\Users\QKDeathStar\AppData\Local\Temp\pip-build-env-c9wbj36t\overlay\Lib\site-packages\setuptools\command\sdist.py", line 209, in read_manifest self.filelist.append(line) File "C:\Users\QKDeathStar\AppData\Local\Temp\pip-build-env-c9wbj36t\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 510, in append path = convert_path(item) File "C:\Users\QKDeathStar\AppData\Local\Temp\pip-build-env-c9wbj36t\overlay\Lib\site-packages\setuptools_distutils\util.py", line 139, in convert_path raise ValueError("path '%s' cannot be absolute" % pathname) ValueError: path '/home/runner/work/astrometry/astrometry/astrometry.net/gsl-an/cblas/caxpy.c' cannot be absolute [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

aMarcireau commented 1 year ago

Hello @retroexpress,

Astrometry (this repository) does not work on Windows because Astrometry.net (the underlying C implementation) is not compatible with Windows. I started listing the changes that would be required to make Astrometry.net compatible with Windows here: https://github.com/neuromorphicsystems/astrometry#msvc-compatibility-work-in-progress (this is not a complete list).

You should be able to run Astrometry on Windows despite this issue by using WSL: https://learn.microsoft.com/en-us/windows/wsl/install