title: Command 'python' not found - after I've assigned it as an alias to python3
body: <p>I'm in the early stages of learning django with python. Have done none of both before.</p>
  <p>I'm following a course where the instructor has showed how to start a new project using vagrant, and one of the files in the main directory is called <code>Vagrantfile</code>, no file extension (same for the instructor).</p>
  <p>These are the contents of the file:</p>
  <pre><code># -*- mode: ruby -*-
  # vi: set ft=ruby :
  
  # All Vagrant configuration is done below. The &quot;2&quot; in Vagrant.configure
  # configures the configuration version (we support older styles for
  # backwards compatibility). Please don't change it unless you know what
  # you're doing.
  Vagrant.configure(&quot;2&quot;) do |config|
   # The most common configuration options are documented and commented below.
   # For a complete reference, please see the online documentation at
   # https://docs.vagrantup.com.
  
   # Every Vagrant development environment requires a box. You can search for
   # boxes at https://vagrantcloud.com/search.
   config.vm.box = &quot;ubuntu/bionic64&quot;
   config.vm.box_version = &quot;~&gt; 20200304.0.0&quot;
  
   config.vm.network &quot;forwarded_port&quot;, guest: 8000, host: 8000
  
   config.vm.provision &quot;shell&quot;, inline: &lt;&lt;-SHELL
     systemctl disable apt-daily.service
     systemctl disable apt-daily.timer
  
     sudo apt-get update
     sudo apt-get install -y python3-venv zip
     touch /home/vagrant/.bash_aliases
     if ! grep -q PYTHON_ALIAS_ADDED /home/vagrant/.bash_aliases; then
       echo &quot;# PYTHON_ALIAS_ADDED&quot; &gt;&gt; /home/vagrant/.bash_aliases
       echo &quot;alias python='python3'&quot; &gt;&gt; /home/vagrant/.bash_aliases
     fi
   SHELL
  end
  </code></pre>
  <p>From my understanding, this line <code>echo &quot;alias python='python3'&quot; &gt;&gt; /home/vagrant/.bash_aliases</code> tells vagrant that when I use the <code>python</code> command, it should regard it as if I wrote <code>python3</code>.</p>
  <p>When I write the following command though <code>python -m venv ~/env</code>, I get in response this message:</p>
  <pre><code>Command 'python' not found, but can be installed with:
  
  apt install python3
  apt install python
  apt install python-minimal
  
  Ask your administrator to install one of them.
  </code></pre>
  <p>I call this command after I've ran the <code>vagrant ssh</code> command and I'm already inside the virtual machine, and navigate to the vagrant dir. I know it because in git bash this shows as my current location <code>vagrant@ubuntu-bionic:/vagrant$</code>.</p>
  <p>I'm not sure if it's related, or if it's a different issue, but I'll add that even if I run this command instead <code>python3 -m venv ~/env</code>, I get this response:</p>
  <pre><code>The virtual environment was not created successfully because ensurepip is not
  available.  On Debian/Ubuntu systems, you need to install the python3-venv
  package using the following command.
  
      apt-get install python3-venv
  
  You may need to use sudo with that command.  After installing the python3-venv
  package, recreate your virtual environment.
  
  Failing command: ['/home/vagrant/env/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']
  </code></pre>
  <p>If I run the install command it recommends (with <code>sudo</code>), I get this in response:</p>
  <pre><code>Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  Package python3-venv is not available, but is referred to by another package.
  This may mean that the package is missing, has been obsoleted, or
  is only available from another source
  </code></pre>
  <p>This blocks my learning, no idea how to move forward with his. Any help is appreciated.</p>