의외로 많이 보게 되는 단순한 설치 문제이다.
$ pip install scikit-build
위처럼 간단히 해결할 수 있다.
의외로 많이 보게 되는 단순한 설치 문제이다.
$ pip install scikit-build
위처럼 간단히 해결할 수 있다.
생각보다 짜증나는 설치 오류이다. 해결은 매우 쉽다. attr과 attrs 패키지를 모두 설치해야 한다.
$ pip install attr
$ pip install attrs
proxy 설정이 되어 있는 경우 하기 사이트에서 해결할 수 있다.
https://driz2le.tistory.com/275
pip 최신 버전 맞춤 설치하기 (0) | 2023.06.05 |
---|---|
Troubleshooting, scikit-build 설치 오류, ModuleNotFoundError: No module named 'skbuild' (0) | 2023.06.04 |
Troubleshooting, numpy 설치 오류, SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel. (0) | 2023.06.04 |
Troubleshooting, docker container 안에서 apt-get update connection timed out (0) | 2023.06.03 |
Ubuntu GUI 원격접속 (0) | 2023.03.30 |
□ 환경
- ubuntu18.04, 20.04
- python 3.7 이상
주로 numpy 설치 시 잘 발생하는 오류이다. (특히, proxy 환경에서... ...)
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
1) 결론부터, pip를 이용하는 방식으로 했을 때 안될 경우 해결방법이 바로 아래와 같다.
$ sudo apt-get install python-dev
특정 python 버전과 밀접한 관련도 많으니, 아래처럼 버전을 확인하여 지정해 주는 것이 가장 해결이 잘된다.
// 아래와 같이 #.# 에 버전을 지정. e.g.) apt-get install python3.7-dev
$ apt-get install python[#.#]-dev
이후 numpy를 설치하면 잘 설치되는 것을 확인할 수 있다.
// 아래는 proxy 환경 사례
$ pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org --proxy 프록시서버IP:포트 numpy
2) pip를 활용하는 일반 방식, 아래와 같이 패키지 설치 시 해결된다고 많은 사이트에서 소개되어 있다. 의외로 잘 해결이 않되는 경우가 많다.
$ pip install python-dev
proxy 환경 아래라면
$ pip install --proxy 프록시서버IP:포트 python-dev
proxy 환경 아래, sslVerify 문제(Retrying ... connection.VerifiedHTTPSConnection ...)가 있을 경우
$ pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org --proxy 프록시서버IP:포트 python-dev
e.g.)
$ pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org --proxy 10.10.10.10:8080 python-dev
Troubleshooting, scikit-build 설치 오류, ModuleNotFoundError: No module named 'skbuild' (0) | 2023.06.04 |
---|---|
Troubleshooting, attr과 attrs 설치 오류, AttributeError: module 'attr' has no attribute 's' (0) | 2023.06.04 |
Troubleshooting, docker container 안에서 apt-get update connection timed out (0) | 2023.06.03 |
Ubuntu GUI 원격접속 (0) | 2023.03.30 |
texlive & texmaker install, ubuntu 18.04 (0) | 2020.07.19 |