2015-04-05 110 views
0

我需要下面的錯誤消息幫助。pip安裝cssselect奇怪的錯誤

謝謝, Mittervi。

Username-MacBook-Pro:~ usernameremoved$ pip install cssselect 
Collecting cssselect 
    Using cached cssselect-0.9.1.tar.gz 
Installing collected packages: cssselect 
    Running setup.py install for cssselect 
    error: could not create '/Library/Python/2.7/site-packages/cssselect': Permission denied 
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/86/t2qqsky97xzgsl4kvhgsr1jh0000gn/T/pip-build-DP_x6t/cssselect/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/86/t2qqsky97xzgsl4kvhgsr1jh0000gn/T/pip-psclw0-record/install-record.txt --single-version-externally-managed --compile: 
running install 

running build 

running build_py 

creating build 

creating build/lib 

creating build/lib/cssselect 

copying cssselect/__init__.py -> build/lib/cssselect 

copying cssselect/parser.py -> build/lib/cssselect 

copying cssselect/tests.py -> build/lib/cssselect 

copying cssselect/xpath.py -> build/lib/cssselect 

running install_lib 

creating /Library/Python/2.7/site-packages/cssselect 

error: could not create '/Library/Python/2.7/site-packages/cssselect': Permission denied 

---------------------------------------- 
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/86/t2qqsky97xzgsl4kvhgsr1jh0000gn/T/pip-build-DP_x6t/cssselect/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/86/t2qqsky97xzgsl4kvhgsr1jh0000gn/T/pip-psclw0-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/86/t2qqsky97xzgsl4kvhgsr1jh0000gn/T/pip-build-DP_x6t/cssselect 

回答

0

我修復了它的使用。

sudo pip install cssselect