LoginSignup
0
0

Anaconda Powershell Promptの環境構築する手順

Last updated at Posted at 2024-04-19

前提条件

・ m2 Mac
・ Anaconda Navigator (インストール済み) 
  インストールしてない場合はこちら参照


手順

1.Powershellをインストール

・ターミナルを開きます。
・以下のコマンドを実行します。

brew install powershell

2.Anaconda Powershell Promptを起動

・Anaconda Navigatorを開きます。
・左側のナビゲーションパネルで「Environments」を選択します。
・右側のリストから、Anaconda Powershell Promptを使用する環境を選択します。
・「Launch」ボタンをクリックします。

3.モジュールをインストール

・Anaconda Powershell Promptが開きます。
・以下のコマンドを実行して、必要なモジュールをインストールします。

Register-PSRepository -Name PSGallery -Source https://gallery.powershellgallery.com/api/v2/
Install-Module -Name poshpaste -Scope CurrentUser

4.設定の更新

・以下をのコマンドを実行して設定を更新します。

Set-PSExecutionPolicy Unrestricted -Scope CurrentUser
Set-Alias psl "powershell.exe -ExecutionPolicy Unrestricted"

5.確認

・以下のコマンドを実行して、powershellが正しい動作していることを確認します。

Get-Module -Name poshpaste

注意事項

・ Set-PSExecutionPolicy Unrestricted コマンドを実行すると、セキュリティリスクが高まります。必要なモジュールをインストールしたら、元のポリシーに戻すことをお勧めします。
・Anaconda Powershell Promptは、Anaconda Navigatorから起動する必要があります。直接ターミナルから起動することはできません。

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