Skip to main content Accessibility help
×
Hostname: page-component-7c8c6479df-8mjnm Total loading time: 0 Render date: 2024-03-28T23:54:09.650Z Has data issue: false hasContentIssue false

Appendix A - Installing a Python Environment

Published online by Cambridge University Press:  02 August 2017

John M. Stewart
Affiliation:
University of Cambridge
Get access

Summary

In order to use Python we need to carry out two tasks. The first is the obvious one of downloading and installing the relevant software. This is an easy, straightforward task, provided one avoids the less-than-obvious pitfalls. Section A.1 shows how to achieve this.

The second task is to determine how to communicate with the Python environment both effectively and efficiently. This is much harder for your author to prescribe because it depends also on the expertise and the ambitions of the reader. Users of Mathematica or Matlab do not face this dilemma, for they are offered just the one interface to their proprietary software. Because it is open-source software, myriads of developers have produced an apparent plethora of ways to interact with Python. The wise reader should expect a trade-off between simplicity and rigidity for the beginner, akin to the commercial examples cited above, and complexity with versatility, more suited to the more experienced and ambitious user.

The next two sections review and suggest how to use them to access your Python environment. My advice is to start where you feel most comfortable, and then come back and advance if and when your ambitions demand progress.

If you have not used the Jupyter notebook before, then you should certainly review Section A.2.2. This describes the many and varied facilities this software offers, without getting into the details of IPython, which are discussed in detail in Chapter 2. Finally, Section A.5 looks at how to enhance your Python environment to suit your own particular needs.

Installing Python Packages

As has been outlined in Section 1.2, we shall need not only core Python, but also the addon packages IPython (see Chapter 2), NumPy, SciPy (packages discussed in Chapter 4), Matplotlib (see Chapter 5), potentially Mayavi (discussed in Chapter 6) and SymPy (reviewed in Chapter 7). Although data analysis is merely mentioned in Section 4.5, that section recommends the Pandas package, and for many this will be a must-have.

Type
Chapter
Information
Python for Scientists , pp. 235 - 243
Publisher: Cambridge University Press
Print publication year: 2017

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×