Skip to content

joaocarvalhoopen/How_to_learn_modern_Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to learn modern Python

A guide to the adventurer

Click para versão em Português/Portuguese version

First to learn modern Python you have to choose an operating system. The Python is the same in all of them but some settings and the libs used by your future programs may be supported in one OS and not in the other OS. In this guide I focus on the development in Linux and Windows, but the info can also be useful for other operating systems.

See the conda version:

    $ conda -V

Update conda

    $ conda update conda

Create a virtual environment for your project (substitute yourenvname by the name of the environment ex: test_01_proj and the x.x by 3.7 the version of Python in the future environment).

    $ conda create -n yourenvname python=x.x anaconda
    ex: $ conda create -n test_01_proj python=3.7 anaconda

See the environments that were created.

    $ conda info -e

To activate the environment

    $ source activate yourenvname
    ex: $ source activate test_01_proj

or

    $ conda activate test_01_proj

To desactivate an active environment

    $ source activate yourenvname
    ex: $ source desactivate

or

    $ conda deactivate

Install additional Python packages to a virtual environment.

    $ conda install -n yourenvname [package]
    ex: $ conda install -n test_01_proj svgwrite

Delete a no longer needed virtual environment

    $ conda remove -n yourenvname -all
    ex: $ conda remove -n test_01_proj -all
  • In your project select the correct interpreter.
    ctrl + shift + p then write "Python select interpreter" command and choose the virtual environment test01_proj that you created from the drop-down selection.

  • Install in Python PyLint and CTags on the virtual environment.

    $ conda install -n test_01_proj -c conda-forge pylint
    $ conda install -n test_01_proj -c conda-forge ctags

If you do all this steps you will have a fair knowledge of Python and can start doing some cool projects in Python.

Have fun!

Best regards,
Joao Nuno Carvalho

About

A guide to the adventurer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages