Book contents
- Frontmatter
- Contents
- Preface to the Second Edition
- Preface to the First Edition
- 1 Introduction
- 2 Getting Started with IPython
- 3 A Short Python Tutorial
- 4 NumPy
- 5 Two-Dimensional Graphics
- 6 Multi-Dimensional Graphics
- 7 SymPy: A Computer Algebra System
- 8 Ordinary Differential Equations
- 9 Partial Differential Equations: A Pseudospectral Approach
- 10 Case Study: Multigrid
- Appendix A Installing a Python Environment
- Appendix B Fortran77 Subroutines for Pseudospectral Methods
- References
- Hints for Using the Index
- Index
Appendix A - Installing a Python Environment
Published online by Cambridge University Press: 02 August 2017
- Frontmatter
- Contents
- Preface to the Second Edition
- Preface to the First Edition
- 1 Introduction
- 2 Getting Started with IPython
- 3 A Short Python Tutorial
- 4 NumPy
- 5 Two-Dimensional Graphics
- 6 Multi-Dimensional Graphics
- 7 SymPy: A Computer Algebra System
- 8 Ordinary Differential Equations
- 9 Partial Differential Equations: A Pseudospectral Approach
- 10 Case Study: Multigrid
- Appendix A Installing a Python Environment
- Appendix B Fortran77 Subroutines for Pseudospectral Methods
- References
- Hints for Using the Index
- Index
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 - 243Publisher: Cambridge University PressPrint publication year: 2017