LoginSignup
1
0

More than 5 years have passed since last update.

Anacondaに独自モジュールを追加する

Last updated at Posted at 2018-04-21

概要

Anaconda環境にrequests_oauthlibをインストールした際のメモ。

バージョン

$  python --version
Python 2.7.14
$ python3 --version
Python 3.6.4 :: Anaconda custom (x86_64)

anaconda search でインストールするモジュールを探す

$ anaconda search -t conda requests_oauthlib
Using Anaconda API: https://api.anaconda.org
Run 'anaconda show <USER/PACKAGE>' to get more details:
Packages:
     Name                      |  Version | Package Types   | Platforms      
     ------------------------- |   ------ | --------------- | ---------------
     syllabs_admin/requests_oauthlib |    0.8.0 | conda           | linux-64       
Found 1 packages
$ anaconda show syllabs_admin/requests_oauthlib
Using Anaconda API: https://api.anaconda.org
Name:    requests_oauthlib
Summary: 
Access:  public
Package Types:  conda
Versions:
   + 0.8.0

To install this package with conda run:
     conda install --channel https://conda.anaconda.org/syllabs_admin requests_oauthlib
$ conda install --channel https://conda.anaconda.org/syllabs_admin requests_oauthlib
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  - requests_oauthlib

Current channels:

  - https://conda.anaconda.org/syllabs_admin/osx-64
  - https://conda.anaconda.org/syllabs_admin/noarch
  - https://repo.anaconda.com/pkgs/main/osx-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/free/osx-64
  - https://repo.anaconda.com/pkgs/free/noarch
  - https://repo.anaconda.com/pkgs/r/osx-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://repo.anaconda.com/pkgs/pro/osx-64
  - https://repo.anaconda.com/pkgs/pro/noarch

インストール失敗。

仮想環境にインストールする

anacondaの環境一覧

$ conda info --envs
$ conda env list

anacondaの仮想環境に入る

$ conda activate base

pipでインストール

$ pip install requests_oauthlib

仮想環境から抜ける

$ conda deactivate

参考リンク

Anaconda 環境に独自にモジュールを追加する
anaconda環境にpythonのモジュールを追加する方法
MacにPython仮想環境を導入する(condaを利用)

1
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
1
0