2016-12-06 2 views
0

scikit-image Download는 말한다 :scikit-image 설치 방법?

pip install -U scikit-image 

또는

easy_install -U scikit-image 

하지만 모두가 플래그에 관계없이 실패 U, 아래와 같이

Georgioss-MacBook-Pro:Downloads gsamaras$ sudo pip install scikit-image 
The directory '/Users/gsamaras/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. 
The directory '/Users/gsamaras/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. 
Collecting scikit-image 
    Downloading scikit_image-0.12.3-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (22.2MB) 
    100% |████████████████████████████████| 22.2MB 53kB/s 
Requirement already satisfied: dask[array]>=0.5.0 in /Library/Python/2.7/site-packages (from scikit-image) 
Collecting six>=1.7.3 (from scikit-image) 
    Downloading six-1.10.0-py2.py3-none-any.whl 
Collecting networkx>=1.8 (from scikit-image) 
    Downloading networkx-1.11-py2.py3-none-any.whl (1.3MB) 
    100% |████████████████████████████████| 1.3MB 133kB/s 
Requirement already satisfied: pillow>=2.1.0 in /Library/Python/2.7/site-packages (from scikit-image) 
Requirement already satisfied: numpy; extra == "array" in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from dask[array]>=0.5.0->scikit-image) 
Requirement already satisfied: toolz>=0.7.2; extra == "array" in /Library/Python/2.7/site-packages (from dask[array]>=0.5.0->scikit-image) 
Collecting decorator>=3.4.0 (from networkx>=1.8->scikit-image) 
    Downloading decorator-4.0.10-py2.py3-none-any.whl 
Installing collected packages: six, decorator, networkx, scikit-image 
    Found existing installation: six 1.4.1 
    DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project. 
    Uninstalling six-1.4.1: 
Exception: 
Traceback (most recent call last): 
    File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main 
    status = self.run(options, args) 
    File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run 
    prefix=options.prefix_path, 
    File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 778, in install 
    requirement.uninstall(auto_confirm=True) 
    File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 754, in uninstall 
    paths_to_remove.remove(auto_confirm) 
    File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove 
    renames(path, new_path) 
    File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/utils/__init__.py", line 267, in renames 
    shutil.move(old, new) 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move 
    copy2(src, real_dst) 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2 
    copystat(src, dst) 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat 
    os.chflags(dst, st.st_flags) 
OSError: [Errno 1] Operation not permitted: '/tmp/pip-qlMJKP-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info' 
Georgioss-MacBook-Pro:Downloads gsamaras$ 

과 :

Georgioss-MacBook-Pro:Downloads gsamaras$ sudo easy_install scikit-image 
Searching for scikit-image 
Reading https://pypi.python.org/simple/scikit-image/ 
Best match: scikit-image 0.12.3 
Downloading https://pypi.python.org/packages/86/d0/b0192dc9a544da90f2d9150bcd84b981c6873e42a1f752b6affb89180ad8/scikit-image-0.12.3.tar.gz#md5=04ea833383e0b6ad5f65da21292c25e1 
Processing scikit-image-0.12.3.tar.gz 
Writing /tmp/easy_install-X6Pjoh/scikit-image-0.12.3/setup.cfg 
Running scikit-image-0.12.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-X6Pjoh/scikit-image-0.12.3/egg-dist-tmp-lHJxkL 
Killed: 9 

Notic 그 brew도 실패, 그것을 찾을 수 없습니다.

필자는 Python 2.7.10, Matplotlib 1.3.1, PIL 3.4.2 및 Scipy '0.18.1'을 사용하고 있습니다. 무엇을해야합니까?

+0

당신은 virtualenv를 사용해야합니다. 내 대답보기 : http://stackoverflow.com/a/40675615/1513933 –

+0

@LaurentLAPORTE 답변이 너무 간결 해 보이고 경험이 없습니다. 제발 나를 안내 할 수 있습니까? :/ – gsamaras

+0

** virtualenv **에 대한 문서는 https://virtualenv.pypa.io입니다. 그러나 또한 나의 대답을보십시오. –

답변

2

일반적으로 시스템 전반의 파이썬에 라이브러리를 설치하는 것은 좋지 않습니다. 대신 각 프로젝트에 대해 virtualenv를 사용하십시오.

먼저 Mac에서 세계적으로 virtualenv를 설치 :

:

$ cd your/prefred/folder 
$ virtualenv your_project 

VIRTUALENV 활성화 :

$ [sudo] pip install virtualenv 

그런 다음 실행 파이썬의 새로운 (사본)을 만들 virtualenv 명령을 사용하여

$ source your_project/bin/activate 

y virtualenv가 생성되고 활성화됩니다 (프롬프트가 활성화를 표시하도록 변경됨). 당신은 그것에 무엇이든 설치할 수 있습니다 :

$ pip install -U scikit-image 
+0

이것이 작동해야하지만, 나는 virtualenv없이 해결하기 위해 죽을 것이다. 나는 다른 것이 오는지보기 위해 기다릴 것이다. 그렇지 않으면 당신의 대답을 받아 들일 것이다, 고마워! 확실히 – gsamaras

+0

. 시스템 전체에 * sudo *를 사용하여 "강제 설치"하면 Python 설치가 오염되고 시스템/OS를 손상시킬 수있는 원치 않는 패키지가 설치 될 수 있습니다. –

+0

아무 것도 나타나지 않았습니다. 나는 이미 설치 한 것들을 먼저 제거한 다음 virtualenv에 들어가는 것이 좋을 것입니다. 맞습니까? – gsamaras