2
abcdefg@HAL9000:~$ pip install beautifulsoup4
Downloading/unpacking beautifulsoup4
  Downloading beautifulsoup4-4.1.3.tar.gz (131Kb): 131Kb downloaded
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 126, in main
    self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 223, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 955, in prepare_files
    self.unpack_url(url, location, self.is_download)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1072, in unpack_url
    return unpack_http_url(link, location, self.download_cache, only_download)
  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 447, in unpack_http_url
    unpack_file(temp_location, location, content_type, link)
  File "/usr/lib/python2.7/dist-packages/pip/util.py", line 468, in unpack_file
    untar_file(filename, location)
  File "/usr/lib/python2.7/dist-packages/pip/util.py", line 393, in untar_file
    os.makedirs(location)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/home/abcdefg/build/beautifulsoup4'

Storing complete log in /home/abcdefg/.pip/pip.log

パーミッションが拒否されていたので、sudo で実行してみました。

abcdefg@HAL9000:~$ sudo pip install beautifulsoup4
Downloading/unpacking beautifulsoup4
  Cannot fetch index base URL http://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement beautifulsoup4
No distributions at all found for beautifulsoup4
Storing complete log in /root/.pip/pip.log

pipなしでもインストールできることはわかっていますが、リクエストのインストール中にもこの問題に遭遇したので、解決策を知りたいです

ありがとう!

4

0 に答える 0