Installation
This tutorial demonstrates how to install Pysodb on a method which use for identifying spatially variable gene.
Using sepal as an example, install Pysodb in its installation environment.
Reference tutorials presents can be found at https://github.com/almaan/sepal and https://github.com/TencentAILabHealthcare/pysodb.
Installing softwares and tools
1. The first step is to install Visual Studio Code, Conda and Jupyter notebook in advance.
Reference tutorials presents how to install Visual Studio Code, Conda and Jupyter notebook,respectively. And they can be found at https://code.visualstudio.com/Docs/setup/setup-overview, https://code.visualstudio.com/docs/python/environments#_activating-an-environment-in-the-terminal and https://code.visualstudio.com/docs/datascience/data-science-tutorial.
2. Launch Visual Studio Code and open a terminal window.
Henceforth, various packages or modules will be installed via the command line
Installation sepal
3. Select the installation path and open it
[ ]:
cd <path>
4. Clone sepal code
[ ]:
git clone https://github.com/almaan/sepal.git
If cloning the code fails through git, please download it at https://github.com/almaan/sepal, upload it to the folder created above, and extract it.
5. Open the sepal directory
[ ]:
cd sepal
6. Create a conda environment
[ ]:
conda create -n <environment_name> python=3.8
7. Activate a conda environment
Run the following command on the terminal to activate the conda environment:
[ ]:
conda activate <environment_name>
8. Install sepal package from source code
[ ]:
chmod +x setup.py
[ ]:
./setup.py install
Referring to the sepal’s installation instructions, a command is as follows: “chmod +x setup.py” and “./setup.py install”. Considering that some devices are not Linux-based systems, an alternative solution is to replace the execution commands with “python setup.py install”.
Recommended packages need to be installed if use a analysis modules. To do this, simply (in the same directory) run:
[ ]:
pip install -e ".[full]"
Installation Pysodb
Keep the conda environment active
9. Clone Pysodb code
[ ]:
git clone https://github.com/TencentAILabHealthcare/pysodb.git
If cloning the code fails through git, please download it at https://github.com/TencentAILabHealthcare/pysodb, upload it to the folder created above, and extract it.
10. Open the Pysodb directory
[ ]:
cd pysodb
11. Install a Pysodb package from source code
[ ]:
python setup.py install
If “error: urllib3 2.0.0a3 is installed but urllib3<1.27,>=1.21.1 is required by {‘requests’}” appears, users can execute the following commands,respectively.
[ ]:
pip install 'urllib3>=1.21.1,<1.27'
python setup.py install
[1]:
print('finish!')
finish!