Git Product home page Git Product logo

tour-python's Introduction

learn-python

Getting started with python

Visual Studio Code

Document here

Some configuration (my OS is Ubuntu 16.04):

Install pip

sudo apt-get install python-pip

Linter with pylint

Install pylint

pip install pylint

Config vscode settings

In settings.json add

{
    "python.linting.pylintPath": "~/.local/bin/pylint"
}

Format with 'autopep8'

Install autopep8

pip install pep8
pip install --upgrade autopep8

Config vscode settings

In settings.json add

{
    "python.formatting.autopep8Path": "~/.local/bin/autopep8"
}

Install pip3 for python3

sudo apt-get update
sudo apt-get -y install python3-pip
pip3 --version

Install and Usage with virtualenv

virtualenv is virtual environment for python interpreter. It's useful for privacy project python, not use as global on your system.

Installation

pip install virtualenv

Usage

  1. Create Virtual Environment In ~/, create new virtual environment python by:
virtualenv python-virtualenv

or use following line to use with python3

virtualenv -p python3 python-virtualenv

It will create new folder python-virtualenv (you can use other name).

  1. Activate and Deactivate virtualenv In terminal:
source ~/python-virtualenv/bin/activate

It will config python run from here To deactivate, run:

deactivate
  1. VS Code settings Change pythonPath and linting/pylintPath with path virtualenv.
{
    "python.pythonPath": "~/python-virtualenv/bin/python3.5",
    "python.linting.pylintPath": "~/python-virtualenv/bin/pylint",
}

Install with some packages

Syntax

pip install [name_package]

Packages:

  1. requests
  2. numpy
  3. matplotlib
  4. sympy
  5. scipy
  6. scikit-learn

tour-python's People

Contributors

huynhsamha avatar

Watchers

James Cloos avatar  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.