简体   繁体   中英

Installing beautifulsoup4 on Fedora 19

I'm trying to install python module called, beautifulsoup4 on Fedora 19 using this command:

pip install beautifulsoup4

But terminal returns me an error:

Downloading/unpacking beautifulsoup4
  Running setup.py egg_info for package beautifulsoup4

Installing collected packages: beautifulsoup4
  Running setup.py install for beautifulsoup4
    error: could not create '/usr/lib/python2.7/site-packages/bs4': Permission denied
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-misha/beautifulsoup4/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-kevEjw-record/install-record.txt --single-version-externally-managed:
    running install

running build

running build_py

running install_lib

creating /usr/lib/python2.7/site-packages/bs4

error: could not create '/usr/lib/python2.7/site-packages/bs4': Permission denied

----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-misha/beautifulsoup4/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-kevEjw-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-build-misha/beautifulsoup4
Storing complete log in /home/misha/.pip/pip.log

How can I fix that?

Thanks.

You have not rights to install the library. If you are into sudoers you should type:

sudo pip install beautifulsoup4

If you don't have rights to install anything, then you can use [virtualenv][1] to create your working environment and install all the stuff you need.

须藤dnf安装python-beautifulsoup4

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