简体   繁体   中英

Errno 13 Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-18954.pth'

I've downloaded python 3.6.1 and I'm trying to use terminal to setup beautifulsoup4 but it keeps trying to install on python 2.7. Any help?

Jakes-iMac:beautifulsoup4-4.5.3 Jake$ cd /Users/Jake/Downloads/beautifulsoup4-4.5.3 Jakes-iMac:beautifulsoup4-4.5.3 Jake$ python setup.py install running install

Checking .pth file support in /Library/Python/2.7/site-packages/

error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the installation directory:

 [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-18954.pth'

The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was:

/Library/Python/2.7/site-packages/

Perhaps your account does not have write access to this directory? If the installation directory is a system-owned directory, you may need to sign in as the administrator or "root" account. If you do not have administrative access to this machine, you may wish to choose a different installation directory, preferably one that is listed in your PYTHONPATH environment variable.

For information on other options, you may wish to consult the documentation at:

https://pythonhosted.org/setuptools/easy_install.html

Please make the appropriate changes for your system and try again

默认情况下,在终端中运行“python”命令将在许多系统上运行 Python 2,即使您已经安装了 Python 3。请尝试改用“python3”命令。

尝试这个:

sudo python setup.py install

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM