Skip to content

Commit f9a5360

Browse files
author
BZandi
committed
Update readme
1 parent b0b3afa commit f9a5360

File tree

1 file changed

+31
-26
lines changed

1 file changed

+31
-26
lines changed

README.md

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,31 @@ More information about our open-source pupillometry project can be found here: [
2323

2424
## 1. Installation
2525

26-
### 1.1 Install PyPupilEXT using pip
26+
### 1.1 Install PyPupilEXT using pip (Recommended)
2727

28-
This feature is forthcoming. Currently, users must compile their own wheel files to utilize PyPupilEXT (see below for instructions).
28+
To install PyPupilEXT using the wheel files, visit the [releases page](https://github.com/openPupil/Open-PupilEXT/releases) of the repository and download the appropriate wheel (.whl) file for your operating system and Python version. Next, open your terminal or command prompt and navigate to the directory where you downloaded the wheel file.
29+
30+
Run the following command to create a new environment named `pypupilenv` with Python 3.10:
31+
```shell
32+
conda create -n pypupilenv python=3.10
33+
conda activate pypupilenv
34+
35+
conda install numpy=1.26.4 matplotlib=3.8.4 pandas=2.2.2
36+
pip install opencv-python==4.10.0.84
37+
```
38+
39+
Run the following command, replacing `<filename>` with the actual name of the wheel file:
40+
41+
```shell
42+
# On macOS with Apple Silicon using Python 3.10
43+
pip install PyPupilEXT-0.0.1-cp310-cp310-macosx_14_0_universal2.whl
44+
45+
# On Ubuntu using Python 3.10
46+
pip install PyPupilEXT-0.0.1-cp310-cp310-linux_x86_64.whl
47+
48+
# On Windows using Python 3.10
49+
pip install PyPupilEXT-0.0.1-cp310-cp310-win_amd64.whl
50+
```
2951

3052
### 1.2 Build and install PyPupilEXT from source
3153

@@ -165,11 +187,9 @@ import pypupilext as pp
165187

166188
For users interested in a hands-on approach, or for testing custom configurations, you can manually set up a Podman or Docker environment with the following steps:
167189

168-
#### Step 1: Start and Configure the Container
169-
170-
Start a container using an Ubuntu base image and install essential development tools and dependencies:
171-
172190
```shell
191+
#### Step 1: Start and Configure the Container
192+
# Start a container using an Ubuntu base image and install essential development tools and dependencies:
173193
podman run -it --memory=8g --shm-size=8g --arch amd64 ubuntu:22.04 /bin/bash
174194

175195
apt-get update
@@ -179,47 +199,32 @@ apt-get install -y libglib2.0-dev libxrandr-dev libxcursor-dev libxinerama-dev l
179199

180200
apt-get clean
181201

182-
```
183-
184202
#### Step 2: Install Miniconda
185-
186-
Download and install Miniconda to manage Python environments effectively:
187-
188-
```shell
203+
# Download and install Miniconda to manage Python environments effectively:
189204
wget -O /tmp/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
190205
chmod +x /tmp/miniconda.sh
191206
/bin/bash /tmp/miniconda.sh -b -p /opt/miniconda
192207
rm /tmp/miniconda.sh
193-
```
194208

195209
#### Step 3: Clone the PyPupilEXT Repository
196-
197-
Retrieve the latest source code from the repository:
198-
199-
```shell
210+
# Retrieve the latest source code from the repository:
200211
git clone --recurse-submodules https://github.com/openPupil/PyPupilEXT.git /PyPupilEXT
201-
```
202212

203213
#### Step 4: Initialize Conda and Environment
204-
205-
```shell
206214
conda init
207215
bash # Restart shell
208216
cd /PyPupilEXT
209217
conda env create -f environment.yml
210218
conda activate pypupilenv
211-
```
212219

213220
#### Step 5: Build the Wheel and Install
214-
215-
Compile the package into a Python wheel file and install it:
216-
217-
```shell
221+
# Compile the package into a Python wheel file and install it:
218222
cd /PyPupilEXT
219223
python setup.py sdist bdist_wheel
220224
pip install dist/*.whl
221225
```
222226

227+
223228
#### Additional commands for Podman that might be usefull
224229

225230
Save the podman image if you like
@@ -252,7 +257,7 @@ Other usefull commands while building the *.whl file on ubuntu
252257
rm -rf PyPupilEXT.egg-info .eggs build dist && mkdir build && cd build
253258
```
254259

255-
### 1.5 The advanced way of installing PyPupilEXT when nothing works
260+
### 1.5 The advanced way of installing PyPupilEXT when nothing works (not recommended!)
256261

257262
If the build process fails, it may be due to the setup.py file. In such a case, it could be useful to compile the C++ files manually. Firstly, you need to find the path to the C++ NumPy header, which is necessary during the compilation. For this, type the following in your shell
258263

0 commit comments

Comments
 (0)