@sjcrh/proteinpaint-python
v2.164.1
Published
Python-based utilities for proteinpaint
Readme
Installation
Docker
This is already included in the deps image and other images that use it as a base image.
Mac
- To run
python/src/dzi.pyon mac, you need to install the following packages:
brew install python- Homebrew's python formula now points to Python 3 by default. Verify that python3 is installed by running:
python3 --version- Install vips for managing large images:
brew install vips- Now in order to install pyvips check if you have a python virtual env
by running
python3 -V, if not you can create one by running
python3 -m venv ~/pppython
source ~/pppython/bin/activate
# check the installed path
which python3
# Gives the absolute path to the python installattion in the virtual environment- Now you should by able to install all the relevant python modules by installing all modules in the requirement.txt file
pip3 install -r requirements.txt
#To test it you can run
python3 src/dzi.py /path/to/file.svs /path/to/images- In order for the
nodejsserver code to use python virtual environment that has been set up, you can do one of the following:
- a. set a
serverconfig.pythonoption that equals the absolute path to your.venv/bin/python3installation - b. call
source path/to/.venv/bin/activatein the same shell or terminal tab/window before running a package script likenpm run dev,npm run test:integration, etc.
- Once Python development and testing are finished, execute the following command from the proteinpaint/python directory to deactivate the currently active virtual environment:
source .venv/bin/deactivateThis is important to keep the GitHub hook working.
