Code Monkey home page Code Monkey logo

multiphase-wsl2-env-verification's Introduction

Verify and Troubleshoot your WSL2 Environment Setup

Action Item

  1. Open your "Ubuntu" application
  2. Run the following command:
$ curl -so- https://raw.githubusercontent.com/learn-co-curriculum/flatiron-manual-setup-validator/master/wsl-phase-0-manual-setup-validator-with-py.sh | bash 2> /dev/null

Check Your Work

<iframe width="560" height="315" src="https://www.youtube.com/embed/LOAbYZmRc9I" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Note: your output from the verification script may include some different checks than are shown in the video. Do not be concerned if that's the case — the information in the video still applies.

If all checks pass, you have completed your environment setup and are ready to move on!

It may be that you are set up correctly, but the validator script can't tell. If there is some sort of error, revisit the instructions for the item that is not passing. If you can run the commands listed in the Check Your Work section of that item, you should be all set and can disregard the validator.

Fixing NVM Issues for WSL2

If you are having trouble getting NVM or Node to work, you may have an issue with your .bashrc file. To fix, we need to run two commands.

The first command makes a backup of your current .bashrc file:

$ mv ~/.bashrc{,.bak}

The second command replaces the contents of your .bashrc file with a default file:

$ curl -sSL https://raw.githubusercontent.com/flatiron-school/dotfiles/master/minimal-bashrc > ~/.bashrc

Close and reopen your terminal. With a new .bashrc file, we can now test out each tool.

Verify NVM is installed

To confirm NVM is installed, run:

$ nvm

If you see a message ending with "Note: to remove, delete, or uninstall nvm…", NVM is installed.

If the nvm command is not recognized, install NVM with the following command:

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

Close and reopen the "Terminal" application, then run nvm again.

Verify Node is Installed

To confirm Node is installed, run:

$ nvm list

If you see a message starting with "-> v14.13.0" (or any number higher than this), a version of Node is installed that will work for this course.

If you don't see this number, install a new version of Node:

$ nvm install node

Verify Python is Installed

To verify that Python is installed, we'll check the version:

$ python --version
# => 3.8.13

If the command returns 3.8.13, you have the correct version installed.

Verify pyenv and pipenv are Installed

Next, to check that pyenv and pipenv are working correctly, we will use pyenv to download a new python version, then use pipenv to create a virtual environment separate from our system environment. We will know everything is working correctly if the new version of Python is installed in the virtual environment and the original version is installed on the system.

# download python version 3.7.15
$ pyenv install 3.7.15

# create a virtual environment with 3.7.15
$ pipenv --python 3.7.15

# enter the virtual environment
$ pipenv shell

# check virtual environment python version
$ python3 --version
# => 3.7.15

# exit virtual environment
$ exit

# check system python version
$ python --version
# => 3.8.13

If the results of the commands match what's shown above, you're all set!

Enabling Virtualization In the BIOS

For most Windows machines, enabling WSL and the Virtual Machine Platform should be enough to get Ubuntu running. Some devices, however, require an additional step - enabling hardware virtualization in the BIOS.

WARNING: Fiddling with your BIOS settings can trash your PC! Be careful when making changes. Consult your manufacturer’s help pages or search for online advice about your specific make and model.

Accessing your BIOS is typically done by rebooting your computer and hitting a specific key, usually DEL, F2, or F10, as the system starts. In the BIOS, look for Virtualization Technology, VTx or something similar.

multiphase-wsl2-env-verification's People

Contributors

lizbur10 avatar professor-ben avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.