티스토리 뷰
Stack Overflow에 자주 검색, 등록되는 문제들과 제가 개발 중 찾아 본 문제들 중에서 나중에도 찾아 볼 것 같은 문제들을 정리하고 있습니다.
Stack Overflow에서 가장 먼저 확인하게 되는 가장 높은 점수를 받은 Solution과 현 시점에 도움이 될 수 있는 가장 최근에 업데이트(최소 점수 확보)된 Solution을 각각 정리하였습니다.
아래 word cloud를 통해 이번 포스팅의 주요 키워드를 미리 확인하세요.
Can't install Scipy through pip
Scipy를 pip로 설치할 수 없습니다.
문제 내용
When installing scipy through pip with :
pip를 사용하여 scipy를 설치할 때, 다음과 같은 오류가 발생하는 경우가 있습니다:
pip install scipy
Pip fails to build scipy and throws the following error:
Pip가 Scipy를 빌드하지 못하고 다음과 같은 오류를 반환합니다:
Cleaning up...
Command /Users/administrator/dev/KaggleAux/env/bin/python2.7 -c "import setuptools, tokenize;__file__='/Users/administrator/dev/KaggleAux/env/build/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/zl/7698ng4d4nxd49q1845jd9340000gn/T/pip-eO8gua-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/administrator/dev/KaggleAux/env/bin/../include/site/python2.7 failed with error code 1 in /Users/administrator/dev/KaggleAux/env/build/scipy
Storing debug log for failure in /Users/administrator/.pip/pip.log
How can I get scipy to build successfully? This may be a new issue with OSX Yosemite since I just upgraded and haven't had issues installing scipy before.
어떻게 하면 scipy를 성공적으로 빌드할 수 있을까요? 이는 OSX Yosemite에서 발생한 새로운 문제일 수 있습니다. 이전에 scipy를 설치하는 데 문제가 없었기 때문입니다.
Debug log:
디버그 로그:
Cleaning up...
Removing temporary dir /Users/administrator/dev/KaggleAux/env/build...
Command /Users/administrator/dev/KaggleAux/env/bin/python2.7 -c "import setuptools, tokenize;__file__='/Users/administrator/dev/KaggleAux/env/build/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/zl/7698ng4d4nxd49q1845jd9340000gn/T/pip-eO8gua-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/administrator/dev/KaggleAux/env/bin/../include/site/python2.7 failed with error code 1 in /Users/administrator/dev/KaggleAux/env/build/scipy
Exception information:
Traceback (most recent call last):
File "/Users/administrator/dev/KaggleAux/env/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/Users/administrator/dev/KaggleAux/env/lib/python2.7/site-packages/pip/commands/install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/Users/administrator/dev/KaggleAux/env/lib/python2.7/site-packages/pip/req.py", line 1435, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "/Users/administrator/dev/KaggleAux/env/lib/python2.7/site-packages/pip/req.py", line 706, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File "/Users/administrator/dev/KaggleAux/env/lib/python2.7/site-packages/pip/util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command /Users/administrator/dev/KaggleAux/env/bin/python2.7 -c "import setuptools, tokenize;__file__='/Users/administrator/dev/KaggleAux/env/build/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/zl/7698ng4d4nxd49q1845jd9340000gn/T/pip-eO8gua-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/administrator/dev/KaggleAux/env/bin/../include/site/python2.7 failed with error code 1 in /Users/administrator/dev/KaggleAux/env/build/scipy
높은 점수를 받은 Solution
After opening up an issue with the SciPy team, we found that you need to upgrade pip with:
SciPy 팀에 이슈를 열어보니, 다음과 같이 pip를 업그레이드해야 한다는 것을 확인했습니다.
pip install --upgrade pip
And in Python 3
this works:
그리고 Python 3에서는 다음과 같이 작동합니다:
python3 -m pip install --upgrade pip
for SciPy to install properly. Why? Because:
SciPy를 올바르게 설치하려면 Python 3에서 이렇게해야 합니다. 왜냐하면:
Older versions of pip have to be told to use wheels, IIRC with --use-wheel. Or you can upgrade pip itself, then it should pick up the wheels.
이전 버전의 pip는 --use-wheel을 사용하여 wheels를 사용해야 합니다. 또는 pip 자체를 업그레이드하면 자동으로 wheels를 사용할 수 있습니다.
Upgrading pip solves the issue, but you might be able to just use the --use-wheel
flag as well.
pip를 업그레이드하면 이 문제가 해결되지만, --use-wheel 플래그를 사용하여 해결할 수도 있습니다.
가장 최근 달린 Solution
the best method I could suggest is this
저가 제안할 수 있는 가장 좋은 방법은 이것입니다.
- Download the wheel file from this location for your version of python
- Move the file to your Main Drive eg C:>
- Run Cmd and enter the following
- pip install scipy-1.0.0rc1-cp36-none-win_amd64.whl
1. 파이썬 버전에 맞는 휠 파일을 다운로드한 후
2. C 드라이브 같은 주요 드라이브로 이동하고,
3. 명령 프롬프트를 실행한 후 다음과 같이 입력합니다.
pip install scipy-1.0.0rc1-cp36-none-win\_amd64.whl
Please note this is the version I am using for my pyhton 3.6.2 it should install fine
참고하십시오. 이것은 내 Python 3.6.2에서 사용하는 버전이며 잘 설치될 것입니다.
you may want to run this command after to make sure all your python add ons are up to date
모든 파이썬 애드온이 최신 상태인지 확인하려면 이 명령어를 실행하는 것이 좋습니다.
pip list --outdated
출처 : https://stackoverflow.com/questions/26575587/cant-install-scipy-through-pip
'개발 > 파이썬' 카테고리의 다른 글
groupby를 사용하여 그룹 내에서 최대 값을 가진 행을 가져오는 방법 (0) | 2023.02.20 |
---|---|
Windows에서 tkinter를 pip 또는 easy_install로 설치하기 (0) | 2023.02.19 |
두 개의 딕셔너리를 연결하여 새로운 딕셔너리를 만들기 (0) | 2023.02.18 |
파이썬에서 문자열을 파일로 래핑하기 (0) | 2023.02.18 |
'sphinx-build fail - autodoc can't import/find module' 오류 수정하기 (0) | 2023.02.17 |