# Installation problem of astropy via pip3

**URL:** <https://community.openastronomy.org/t/installation-problem-of-astropy-via-pip3/521>\
**Category:** Astropy\
**Tags:** astropy, question\
**Created:** [November 24, 2022, 9:07am UTC](https://community.openastronomy.org/t/installation-problem-of-astropy-via-pip3/521 "2022-11-24T09:07:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KMG](https://dub1.discourse-cdn.com/flex005/user_avatar/community.openastronomy.org/kmg/32/304_2.png) [@KMG](https://community.openastronomy.org/u/KMG)\
**Post date:** [November 24, 2022, 9:07am UTC](https://community.openastronomy.org/t/installation-problem-of-astropy-via-pip3/521/1 "2022-11-24T09:07:15Z")

</div>

I tried to install astropy via pip3.  
My environment is as follows:

- MacBook Pro 14 inch
- Apple M1 Max
- macOS Monterey 12.6.1
- Python3.10.8

When I typed “pip3 install astropy”, installation of pyerfa failed.  
Though an installed version of pyerfa (0.0.0?) seems too old, I don’t know how to fix it.  
I’m happy if anyone gives me feedback.

> Using cached astropy-4.2.tar.gz (7.5 MB)  
> Installing build dependencies … error  
> error: subprocess-exited-with-error
> 
> × pip subprocess to install build dependencies did not run successfully.  
> │ exit code: 1  
> ╰─\> [75 lines of output]  
> Collecting setuptools  
> Using cached setuptools-65.6.3-py3-none-any.whl (1.2 MB)  
> Collecting setuptools\_scm  
> Using cached setuptools\_scm-7.0.5-py3-none-any.whl (42 kB)  
> Collecting wheel  
> Using cached wheel-0.38.4-py3-none-any.whl (36 kB)  
> Collecting cython==0.29.14  
> Using cached Cython-0.29.14.tar.gz (2.1 MB)  
> Preparing metadata (setup.py): started  
> Preparing metadata (setup.py): finished with status ‘error’  
> error: subprocess-exited-with-error

---

<div class="post-metadata">

**Author:** ![dhomeier](https://dub1.discourse-cdn.com/flex005/user_avatar/community.openastronomy.org/dhomeier/32/65_2.png) [@dhomeier](https://community.openastronomy.org/u/dhomeier)\
**Post date:** [November 28, 2022, 10:04pm UTC](https://community.openastronomy.org/t/installation-problem-of-astropy-via-pip3/521/2 "2022-11-28T22:04:37Z")

</div>

pip seems to have trouble handling pyerfa’s and astropy’s dependencies on setuptools\_scm – if you _first_ run `pip3 install setuptools_scm`, then the version numbers should be correctly resolved.  
HTH

---

<div class="post-metadata">

**Author:** ![KMG](https://dub1.discourse-cdn.com/flex005/user_avatar/community.openastronomy.org/kmg/32/304_2.png) [@KMG](https://community.openastronomy.org/u/KMG)\
**Post date:** [December 2, 2022, 3:37am UTC](https://community.openastronomy.org/t/installation-problem-of-astropy-via-pip3/521/3 "2022-12-02T03:37:13Z")

</div>

After uninstalling all libraries installed using pip3 and reinstalling setuptools\_scm first, I was able to install pyerfa and astropy.  
Thank you very much!
