Code Monkey home page Code Monkey logo

learnpython's Introduction

Popular Python runtimes

CPython Jython IronPython PyPy

  • computers come with multiple versions of standard CPython pre-installed.

Check python version:

$python --version

Python3 verison:

python3 --version

Creating virtual environment:

python3 -m venv myenv
  • here myenv is the name of virtual environment, we can give any name.

  • Then activate the virtual environment

source myenv/bin/activate

#After this command, virtual env should start reflecting in 
#terminal like this

# (myenv) at the leftmost corner
  • Deactivating a virtual environment:
deactivate

Install requirements in virtual environment using pip

  • before this upgrade pip using following command:
pip install --upgrade pip
  • After this install requirements from requirements.txt file:
  • make sure your virtual env is activated.
pip install -r requirements.txt
  • here -r is for recursive.

Once requirements are installed, we are good to go.

Creating requirements.txt file

  • on the go if we change requirements or add new dependencies we need to keep modifying this file.

  • we can generate this file from venv directly using following command:

pip freeze > requirements.txt
  • make sure venv is active so that dependencies are being picked from there only rather than global python packages.

learnpython's People

Contributors

bharat1234567 avatar bharatmakhija 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.