Install Phenospy - diegosasso/workshop_ISH2023 GitHub Wiki

Install Python, pip, and the Phenospy package

Install Python >=3.0

If you are a new user with Python 2 installed, you should uninstall it and install Python 3 instead. For more information, please refer to this discussion.

One of the simplest ways to install Python 3 is to install Anaconda which automatically installs Python 3.

If you have VS Code already installed, a simpler alternative is to just install Python as a VS Code extension. That can be really helpful to run scripts without leaving the VS Code interface. For that follow the instructions below:

  1. Open VS Code and click on the Extensions icon in the left-hand sidebar (or press Ctrl+Shift+X on Windows or Cmd+Shift+X on Mac).
  2. In the search bar at the top of the Extensions panel, type in the extension name 'Python'.
  3. Select the 'Python' extension from the search results.
  4. Click the "Install" button on the extension's page.

For macOS users: If you receive an error message related to Python certificates at any point when trying to run Phenospy, then you can run Install.Certificat.command in the Python folder.

Install pip

Pip is usually pre-installed with Python on macOS and Windows. However, if pip is not installed or you want to upgrade it to the latest version, you can follow these steps:

For macOS:

  1. In your terminal type the following command to download the get-pip.py script:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
  1. Type the following command to run the get-pip.py script and install pip:
sudo python get-pip.py
  1. Verify that pip is installed by typing the following command:
pip --version

For Windows:

Open a command prompt by clicking on the "Start" menu, typing "cmd" into the search box, and selecting "Command Prompt" from the search results.

  1. Type the following command to install pip:
py -m ensurepip --default-pip
  1. Type the following command to upgrade pip to the latest version:
py -m pip install --upgrade pip

Install Phenospy

In most cases, Phenospy package can be installed directly from the PyPI repository by running the following command in your terminal (macOS) or a command prompt (Windows):

pip install phenospy

In the event that this does not work, it may be due to the following reasons:

  • You do not have Python >=3.0 installed.
  • You do not have pip installed.

See the instructions above on how to install Python and pip.