

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

# Passaggio 1: Preparare l'ambiente per l'esecuzione dello script
<a name="w2ab1c14c43c17b9"></a>

Prepara l'ambiente eseguendo i comandi appropriati per il tuo sistema operativo.

**Topics**
+ [Amazon Linux 2](#w2ab1c14c43c17b9b7)
+ [Amazon Linux](#w2ab1c14c43c17b9b9)
+ [Ubuntu 18.04, 20.04, 22.04](#w2ab1c14c43c17b9c11)
+ [Red Hat Enterprise Linux 8](#w2ab1c14c43c17b9c13)
+ [Windows Server 2019, Windows 10 Enterprise](#w2ab1c14c43c17b9c15)

## Amazon Linux 2
<a name="w2ab1c14c43c17b9b7"></a>

```
sudo su
python3 -m pip install pipenv
PATH="$PATH:/usr/local/bin"
yum update
yum install git
```

## Amazon Linux
<a name="w2ab1c14c43c17b9b9"></a>

```
sudo su
PATH="$PATH:/usr/local/bin"
export LC_ALL=en_US.utf-8
export LANG=en_US.utf-8
yum update
yum list | grep python3
yum install python36 // Any python version
yum install git
```

Per la versione 3.6 di Python, esegui anche:

```
python3 -m pip install pipenv==2022.4.8
```

Per Python versione 3.7 e successive, esegui anche:

```
python3 -m pip install pipenv
```

## Ubuntu 18.04, 20.04, 22.04
<a name="w2ab1c14c43c17b9c11"></a>

```
sudo su
export PATH="${HOME}/.local/bin:$PATH"
apt-get update
apt install python3-pip
apt-get install git // if git is not installed
python3 -m pip install --user pipenv==2022.4.8
```

## Red Hat Enterprise Linux 8
<a name="w2ab1c14c43c17b9c13"></a>

```
sudo su
sudo dnf install python3 
PATH="$PATH:/usr/local/bin"
yum update
yum install git
python3 -m pip install pipenv==2022.4.8
```

## Windows Server 2019, Windows 10 Enterprise
<a name="w2ab1c14c43c17b9c15"></a>

**Nota**  
Per Windows Server 2019, installa Python versione 3.6.1 o successiva.

```
pip install pipenv
```

Se Git non è già installato, scarica e installa [Git](https://git-scm.com/download/win).

Se usi Git come fonte per libri di cucina, aggiungi il tuo server Git a un `known_hosts` file prima di eseguire lo script su Windows. È possibile utilizzare PowerShell per creare la seguente funzione.

```
function add_to_known_hosts($server){
    $new_host=$(ssh-keyscan $server 2> $null)
    $existing_hosts=''
    if (!(test-path "$env:userprofile\.ssh")) {
        md "$env:userprofile\.ssh"
    }
    if ((test-path "$env:userprofile\.ssh\known_hosts")) {
        $existing_hosts=Get-Content "$env:userprofile\.ssh\known_hosts"
    }
    $host_added=0
    foreach ($line in $new_host) {
        if (!($existing_hosts -contains $line)) {
            Add-Content -Path "$env:userprofile\.ssh\known_hosts" -Value $line
            $host_added=1
    }
   }
   if ($host_added) {
       echo "$server has been added to known_hosts."
   } else {
       echo "$server already exists in known_hosts."
   }
}
```

Puoi quindi fornire il tuo server Git (ad esempio, github.com, git-codecommit). *repository\$1region*.amazonaws.com) quando esegui la funzione.

```
add_to_known_hosts "myGitServer"
```