Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Learn Python Programming 3E. Published by Packt

License

NotificationsYou must be signed in to change notification settings

PacktPublishing/Learn-Python-Programming-Third-Edition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to Learn Python Programming, 3rd Edition.

Here you can find the complete source code for this book. Everyline of code you will find in the book is in this repository, plusall the code that we couldn't fit in the book.

Working on a chapter

We suggest you create a dedicated virtual environment for each chapteryou wish to work on. Chapters that require third-party libraries willhave a folder inside, calledrequirements.

First you will need to create a virtual environment. If you don't knowwhat a virtual environment is, please read Chapter 1.

Let's now pretend you want to work on Chapter 12. First, change into the folderfor Chapter 12 (it's calledch12):

$ cd ch12

Then, create a virtual environment. In this example the virtual environmentwill live inside the chapter's folder, but you can choose any other folderthat might suit you better.

$ python3.9 -m venv .venv

We have given the virtual environment folder the name.venv. Feel freeto choose any other name that you might want.


Note: the above procedure might fail in some of the chapter folders, dueto the presence of files that aren't meant to be run. If that is the case, youshould choose another folder where to place your virtual environment. You cancreate one within the chapter folder itself, or place the virtual environmentoutside of the chapter folder altogether.


Next step is to activate the virtual environment:

$ source  .venv/bin/activate

If you're on Windows, to activate your environment, you will need to run:

$ .venv\Scripts\activate

Next, if therequirements folder is present, change into it, and runthe following command for each of the.txt files you will find in it.Normally there is only arequirements.txt file.

$ cd requirements$ pip install -U -r requirements.txt$ cd ..  # this brings you back to the root of the chapter

Once you have installed all requirements, you are ready to run thechapter's code. If a chapter needs extra work to be set up, you willfind all the instructions you need in the chapter's text.

Note:Always remember to activate the virtual environment before you installthird-party libraries.

Download a free PDF

If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

https://packt.link/free-ebook/9781801815093

About

Learn Python Programming 3E. Published by Packt

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors6


[8]ページ先頭

©2009-2025 Movatter.jp