QuPath H-DAB Project
  • ๐Ÿ“ŠQuPath guide for H-DAB Cell Counting Docs
  • ๐Ÿ’กPipeline
    • ๐Ÿ’กSimple Pipeline
  • Fundamentals
    • ๐Ÿ› ๏ธGetting Set Up
  • QuPath H-Dab Docs
    • ๐Ÿ’กQuPath H-DAB Tutorial
      • Creating and Opening of Projects
      • Estimating Stain Vectors
      • Training Image Creation
      • Cell Detection
      • Object Classifier
      • Tissue Detection
        • 1๏ธโƒฃAutomatic General Tissue Detection
        • 2๏ธโƒฃManual Specific Tissue Detection
    • ๐ŸงพQuPath Script
      • Batch Processing
    • ๐Ÿ“‚Output
  • Result Analysis Docs
    • ๐Ÿ’กProcessing Package Tutorial
      • Addition Information for Python insiders
      • In-Depth Python usage
    • ๐Ÿ—„๏ธFinal Spreadsheet creation
    • ๐Ÿ†˜Out-of-memory error
  • non-expert docs
    • ๐Ÿ”ŽQuPath Installation
    • ๐Ÿ’ปGit Bash Installation
    • ๐Ÿ–ฅ๏ธPython Installation & Packages
    • Git Bash installation
Powered by GitBook
On this page
  • Step 1: Download and Install Python via website
  • Step 1A: Dowloading Python via Git Bash prompt
  • Step 2: Install Data Science Packages
  1. non-expert docs

Python Installation & Packages

If your not an expert on using Python, here there is a guide on how to download it:

PreviousGit Bash InstallationNextGit Bash installation

Last updated 1 year ago

Step 1: Download and Install Python via website

  1. Visit the Python website:

    Go to thein your browser.

  2. Download Python:

    Click on the "Downloads" tab, and you'll see a button for the latest version of Python. Click on it to start the download.

Be careful of downloading the Python version that is compliant with your system (Windows, MacOS, or Linux)

  1. Run the Installer: Once the download is complete, open the installer from you Downloads directory. Make sure to check the box that says "Add Python to PATH" during the installation. This makes it easier to run Python from the command line.

  2. Verify Installation:

    Open a command prompt (on Windows or on macOS using or Linux) and type:

    python --version

    This should display the installed Python version, confirming a successful installation.

Step 1A: Dowloading Python via Git Bash prompt

  1. Open a Git Bash Terminal or Command Prompt:

    You can do that opening the search bar and type in "Git Bash" and select the Git Bash application.

  2. Navigate to a Directory:

    In this case, navigate to the ProjectFolder using the path:

cd Path/to/ProjectFolder
  1. Download Python Installer:

    • Go to the Dowloads section, search for the newest version compatible with your computer system, click on it and on the address bar of the webpage you can copy the url of the version using Ctrl + C. Replace <version> with the desired version using Shift + Insert in the Git Bash terminal when typing this command:

curl -O https://www.python.org/ftp/python/<version>/python-<version>-amd64.exe

For example, to downlad Python 3.9.7:

curl -O https://www.python.org/ftp/python/3.9.7/python-3.9.7-amd64.exe
  1. Run Python Installer:

    Execute the downloaded Python installer using the startcommand.

start python-<version>-amd64.exe
start python-3.9.7-amd64.exe #as in the previous example
  1. Python Installer Setup:

    • The Python installer will open. Make sure to check the box that says "Add Python to PATH" during installation.

    • Click "Install Now" to proceed with the default settings.

  2. Wait for Installation and Verify it:

    • Open a new Git Bash terminal and check if Python is installed by typing:

python --version
  1. Done! Now you can come back to the original Git Bash prompt to continue with the Data Science Packages.

Step 2: Install Data Science Packages

Now that you have Python installed, you can use the package manager pip to install the data science packages you need.

  1. Open a Terminal or Command Prompt:

  2. Install pandas, numpy, seaborn, and matplotlib:

    Type the following command and press Enter:

    pip install pandas numpy seaborn matplotlib scipy openpyxl

    This command installs the required packages:

    • pandas: Data manipulation and analysis library.

    • numpy: Numerical computing library.

    • seaborn: Statistical data visualization library based on matplotlib.

    • matplotlib: Plotting library for creating static, animated, and interactive visualizations.

    • scipy: Modules for optimization, linear algebra, integration, interpolation, special functions, FFT, signal and image processing

    • openpyxl: Library to read/write Excel 2010 xlsx/xlsm/xltx/xltm files

  3. Verify Installation:

    You can verify the installation by opening another Git Bash terminal and open there a Python shell (type python in your terminal) and trying to import each library:

    import pandas
    import numpy
    import seaborn
    import matplotlib

    If there are no errors, the packages are successfully installed.

License:

Van Rossum, G., & Drake, F. L. (2009). Python 3 Reference Manual. Scotts Valley, CA: CreateSpace.

Waskom, M. L., (2021). seaborn: statistical data visualization. Journal of Open Source Software, 6(60), 3021, https://doi.org/10.21105/joss.03021.

J. D. Hunter, "Matplotlib: A 2D Graphics Environment", Computing in Science & Engineering, vol. 9, no. 3, pp

Use the curl command to download the Python installer. You can get the link for the latest version from the page.

Open a terminal or command prompt, depending on your system. Use if on Windows/MacOS directly from the Start Menu.

Congratulations! You've now installed Python and some essential data science libraries. You're ready to start the analysis and follow the tutorial.

, McKinney, Proceedings of the 9th Python in Science Conference, Volume 445, 2010.

Harris, C.R., Millman, K.J., van der Walt, S.J. et al. Array programming with NumPy. Nature 585, 357โ€“362 (2020). DOI: .

๐Ÿ–ฅ๏ธ
Python website
Git Bash
Python website
Git Bash
here
Data structures for statistical computing in python
10.1038/s41586-020-2649-2