5
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ubuntu LTS 18.04 Anaconda3でPermissionErrorの対処メモ

Last updated at Posted at 2018-10-19

状況

Ubuntu初心者です。

Ubuntu LTS 18.04にAnaconda3(5.2.0)を普通にインストールした状態にて、conda installやpip installで何かパッケージをインストールしようとしたときに

PermissionError(13, 'Permission denied')

が出てインストールが失敗しました。

対処

シェルを立ち上げてanaconda3ディレクトリがある場所で
(通常anaconda3はhome直下に作られるようなのでそのまま)

~$ sudo chown -R <ユーザ名> anaconda3

Anaconda3ディレクトリの所有権を現ユーザに変更することでインストールできるようになりました。

<ユーザ名>は今anacondaを使用しているユーザ名になります。
ユーザ名がsamacobaならば

~$ sudo chown -R samacoba anaconda3

になります。

  • sudo:root権限で実行
  • chownコマンド:所有権の変更
  • -Rのオプション:Anaconda3以下全部のディレクトリについて変更

おそらく、anacondaはデフォルトでユーザディレクトリにインストールされますが、作ったanaconda3ディレクトリにユーザの所有権がないのでそんな感じになったのではないかと思います。

5
6
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
5
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?