Mercurial > repos > bimib > cobraxy
diff COBRAxy/docs/troubleshooting.md @ 542:fcdbc81feb45 draft
Uploaded
| author | francesco_lapi |
|---|---|
| date | Sun, 26 Oct 2025 19:27:41 +0000 |
| parents | 4ed95023af20 |
| children |
line wrap: on
line diff
--- a/COBRAxy/docs/troubleshooting.md Sat Oct 25 15:20:55 2025 +0000 +++ b/COBRAxy/docs/troubleshooting.md Sun Oct 26 19:27:41 2025 +0000 @@ -4,23 +4,50 @@ ## Installation Issues +### Missing Build Tools + +**Problem**: `gcc: command not found` or compilation errors (Linux/macOS) +```bash +# Ubuntu/Debian +sudo apt-get install build-essential cmake pkg-config + +# macOS +xcode-select --install +brew install cmake pkg-config +``` + +**Problem**: `CMake not found` +```bash +# Ubuntu/Debian +sudo apt-get install cmake + +# macOS +brew install cmake + +# Or via conda +conda install -c conda-forge cmake +``` + ### Python Import Errors **Problem**: `ModuleNotFoundError: No module named 'cobra'` ```bash -# Solution: Install missing dependencies -pip install cobra pandas numpy scipy +# Solution: Reinstall COBRAxy with dependencies +cd COBRAxy/src +pip install . -# Or reinstall COBRAxy -cd COBRAxy -pip install -e . +# Or install missing dependency directly +pip install cobra ``` **Problem**: `ImportError: No module named 'cobraxy'` ```python -# Solution: Add COBRAxy to Python path +# Solution: Ensure COBRAxy is installed +pip install /path/to/COBRAxy/src/ + +# Or add to Python path temporarily import sys -sys.path.insert(0, '/path/to/COBRAxy') +sys.path.insert(0, '/path/to/COBRAxy/src') ``` ### System Dependencies @@ -64,7 +91,7 @@ ```python # Check gene overlap with model import pickle -genes_dict = pickle.load(open('local/pickle files/ENGRO2_genes.p', 'rb')) +genes_dict = pickle.load(open('src/local/pickle files/ENGRO2_genes.p', 'rb')) model_genes = set(genes_dict['hugo_id'].keys()) import pandas as pd @@ -244,7 +271,7 @@ conda activate cobraxy # Install COBRAxy fresh -cd COBRAxy +cd COBRAxy/src pip install -e . ``` @@ -328,8 +355,7 @@ ### Community Resources -- **GitHub Issues**: [Report bugs](https://github.com/CompBtBs/COBRAxy/issues) -- **Discussions**: [Ask questions](https://github.com/CompBtBs/COBRAxy/discussions) +- **GitHub Issues**: [Report bugs and ask questions](https://github.com/CompBtBs/COBRAxy/issues) - **COBRApy Community**: [General metabolic modeling help](https://github.com/opencobra/cobrapy) ### Self-Help Checklist
