LoginSignup
0
0

More than 5 years have passed since last update.

Python Fakerのインストールでこけた!!

Posted at

すごく単純で恥ずかしい話なので、あまりQiita向けじゃないけど、
記録として残しておきます。

なんでさね!!


[vagrant@milky-vagrant fake-factory-0.5.3]$ pip install faker
Collecting faker
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f706fadd4a8>: Failed to establish a new connection: [Errno -2] Der Name oder der Dienst ist nicht bekannt',)': /simple/faker/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f706faddc88>: Failed to establish a new connection: [Errno -2] Der Name oder der Dienst ist nicht bekannt',)': /simple/faker/

インストールしようとしたらこんなエラーがまっきっきな字で表示されしまいました。
ふぁー!なんてこったい!!
調べると、Proxyだーなんだという記述。
仕方ないので、スマホでテザリングして落とせまし…たとはいかず、
途中まで進んだもののやっぱり赤字で

Exception:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python3.6/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/usr/lib/python3.6/site-packages/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/usr/lib/python3.6/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/usr/lib/python3.6/site-packages/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "/usr/lib/python3.6/site-packages/pip/wheel.py", line 316, in clobber
ensure_dir(destdir)
File "/usr/lib/python3.6/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
os.makedirs(path)
File "/usr/lib64/python3.6/os.py", line 220, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Keine Berechtigung: '/usr/lib/python3.6/site-packages/text_unidecode'

なんてかわいくない表示が…
調べてみると、Stackflowにて素敵な回答。
“PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.5/site-packages'” installing Django

1
You must have root privileges when installing modules to the system python. Use sudo. – MisterMiyagi Oct 10 '16 at 1:55

1
おいおい、rootでインストールしないといけないぜ?sudo使えよ

なるほど。

sudo pip3 install Faker

で無事解決。
覚書として投稿。(こんな初歩の初歩なんてクソの役にも立たないと思いますが…)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0