簡體   English   中英

使用PyCharm,似乎無法導入Pyperclip模塊

[英]Using PyCharm, Can't Seem to Import Pyperclip module

當我輸入pip install pyperclip ,我得到:

Collecting pyperclip
  Using cached pyperclip-1.5.27.zip
Installing collected packages: pyperclip
  Running setup.py install for pyperclip ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/70/2rxbr83d37xgqtk215y88p_m0000gn/T/pip-build-0mgGiQ/pyperclip/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/70/2rxbr83d37xgqtk215y88p_m0000gn/T/pip-7v2hjv-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/pyperclip
    copying pyperclip/__init__.py -> build/lib/pyperclip
    copying pyperclip/clipboards.py -> build/lib/pyperclip
    copying pyperclip/exceptions.py -> build/lib/pyperclip
    copying pyperclip/windows.py -> build/lib/pyperclip
    running install_lib
    creating /Library/Python/2.7/site-packages/pyperclip
    error: could not create '/Library/Python/2.7/site-packages/pyperclip': Permission denied



Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/70/2rxbr83d37xgqtk215y88p_m0000gn/T/pip-build-0mgGiQ/pyperclip/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/70/2rxbr83d37xgqtk215y88p_m0000gn/T/pip-7v2hjv-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/70/2rxbr83d37xgqtk215y88p_m0000gn/T/pip-build-0mgGiQ/pyperclip/

您無法建立必要的目錄。 要么這樣做:

sudo pip install paperclip

或更好的首選解決方案,請安裝virtualenv 大量的SO示例,這里是鏈接:

http://docs.python-guide.org/en/latest/dev/virtualenvs/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM