Code Monkey home page Code Monkey logo

setting-up-simple-python-environment's Introduction

setting-up-simple-python-environment

Lab for setting up simple python environment using venv and pip

  1. Make a directory named 'simple-env' by running the command mkdir simple-env.
  2. Change to this directory by running the command cd simple-env.
  3. Create a virtual environment named 'env' by running the command python -m venv env.
  4. Activate the virtual environment by running the command source env/bin/activate
  5. Get the path for python by running which python and confirm that the path to the enabled python points to your virtual environment directory.
  6. Run python -c "import pandas" to see that pandas is not installed (you should get an error).
  7. Use pip to install the library pandas by running the command pip install pandas.
  8. Run python -c "import pandas" again. Now you should get no output.
  9. Write your environment to a file by running the command pip freeze > requirements.txt
  10. See the contents of your requirements file by running cat requirements.txt. You should see some package names and versions, including a line for pandas.

setting-up-simple-python-environment's People

Contributors

kbehrman avatar

Watchers

 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.