Skip to content

Commit a0e266e

Browse files
committed
editable install instead of pythonpath
1 parent aa4545a commit a0e266e

File tree

1 file changed

+10
-98
lines changed

1 file changed

+10
-98
lines changed

README.md

Lines changed: 10 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,22 @@
77
## 🔧 Installation
88

99

10-
To install, follow these steps:
10+
To install this repository, download [`python-chebai`](https://github.com/ChEB-AI/python-chebai) and this repository, then run
1111

12-
1. Clone the repository:
1312
```
14-
git clone https://github.com/ChEB-AI/python-chebai-proteins.git
13+
cd python-chebai
14+
pip install .
15+
16+
cd python-chebai-proteins
17+
pip install .
1518
```
1619

17-
2. Install the package:
20+
_Note for developers_: If you want to install the package in editable mode, use the following command instead:
1821

22+
```bash
23+
pip install -e .
1924
```
20-
cd python-chebai
21-
pip install .
22-
```
25+
2326

2427
## 🗂 Recommended Folder Structure
2528

@@ -43,39 +46,6 @@ This setup enables shared access to data and model configurations.
4346

4447
## 🚀 Training & Pretraining Guide
4548

46-
### ⚠️ Important Setup Instructions
47-
48-
Before running any training scripts, ensure the environment is correctly configured:
49-
50-
* Either:
51-
52-
* Install the `python-chebai` repository as a package using:
53-
54-
```bash
55-
pip install .
56-
```
57-
* **OR**
58-
59-
* Manually set the `PYTHONPATH` environment variable if working across multiple directories (`python-chebai` and `python-chebai-proteins`):
60-
61-
* If your current working directory is `python-chebai-proteins`, set:
62-
63-
```bash
64-
export PYTHONPATH=path/to/python-chebai
65-
```
66-
or vice versa.
67-
68-
* If you're working within both repositories simultaneously or facing module not found errors, we **recommend configuring both directories**:
69-
70-
```bash
71-
# Linux/macOS
72-
export PYTHONPATH=path/to/python-chebai:path/to/python-chebai-proteins
73-
74-
# Windows (use semicolon instead of colon)
75-
set PYTHONPATH=path\to\python-chebai;path\to\python-chebai-proteins
76-
```
77-
78-
> 🔎 See the [PYTHONPATH Explained](#-pythonpath-explained) section below for more details.
7949

8050

8151
### 📊 SCOPE hierarchy prediction
@@ -86,61 +56,3 @@ python -m chebai fit --trainer=../configs/training/default_trainer.yml --trainer
8656
```
8757

8858
Same command can be used for **DeepGO** just by changing the config path for data.
89-
90-
91-
92-
93-
94-
95-
96-
## 🧭 PYTHONPATH Explained
97-
98-
### What is `PYTHONPATH`?
99-
100-
`PYTHONPATH` is an environment variable that tells Python where to search for modules that aren't installed via `pip` or not in your current working directory.
101-
102-
### Why You Need It
103-
104-
If your config refers to a custom module like:
105-
106-
```yaml
107-
class_path: chebai_proteins.preprocessing.datasets.scope.scope.SCOPe50
108-
```
109-
110-
...and you're running the code from `python-chebai`, Python won't know where to find `chebai_proteins` (from another repo like `python-chebai-proteins/`) unless you add it to `PYTHONPATH`.
111-
112-
113-
### How Python Finds Modules
114-
115-
Python looks for imports in this order:
116-
117-
1. Current directory
118-
2. Standard library
119-
3. Paths in `PYTHONPATH`
120-
4. Installed packages (`site-packages`)
121-
122-
You can inspect the full search paths:
123-
124-
```bash
125-
python -c "import sys; print(sys.path)"
126-
```
127-
128-
129-
130-
### ✅ Setting `PYTHONPATH`
131-
132-
#### 🐧 Linux / macOS
133-
134-
```bash
135-
export PYTHONPATH=/path/to/python-chebai-graph
136-
echo $PYTHONPATH
137-
```
138-
139-
#### 🪟 Windows CMD
140-
141-
```cmd
142-
set PYTHONPATH=C:\path\to\python-chebai-graph
143-
echo %PYTHONPATH%
144-
```
145-
146-
> 💡 Note: This is temporary for your terminal session. To make it permanent, add it to your system environment variables.

0 commit comments

Comments
 (0)