Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved installation guide #508

Merged
merged 3 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 23 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,18 @@ There are 4 alternative ways to install CNApy:

1. If you use Windows, the easiest way is to use our Windows installer, see section [Using the Windows installer](#using-the-windows-installer).
2. If you use Linux or Apple MacOS X, the easiest installation producure is our assisted installation protocol, see [Assisted installation under Linux and MacOS X](#assisted-installation-under-linux-and-macos-x).
3. If you already have installed Anaconda or Miniconda on your computer, you can directly install CNApy as a conda package as described in section [Install CNApy as conda package](#install-cnapy-as-conda-package).
4. If you want to develop CNApy, follow the instruction for the cloning and set-up of the CNApy repository using git and conda in section [Setup the CNApy development environment](#setup-the-cnapy-development-environment).
3. If you already have installed [Anaconda](https://www.anaconda.com/), [Miniconda](https://docs.anaconda.com/free/miniconda/index.html) or [Miniforge](https://github.com/conda-forge/miniforge) on your computer, you can directly install CNApy as a conda package as described in section [Install CNApy as conda package](#install-cnapy-as-conda-package).
4. If you want to develop CNApy, follow the instruction for the cloning and setup of the CNApy repository using git and conda or mamba in section [Setup the CNApy development environment](#setup-the-cnapy-development-environment).

## Contribute to the CNApy development

Everyone is welcome to contribute to CNApy's development. [See our contribution file for more detailed instructions](https://github.com/cnapy-org/CNApy/blob/master/CONTRIBUTING.md).

## Using the Windows installer

1. Download the zipped CNApy Windows installer [from here](https://github.com/cnapy-org/CNApy/releases/download/v1.1.10/cnapy-windows-installer.zip).
1. Download the zipped CNApy Windows installer [from here](https://github.com/cnapy-org/CNApy/releases/download/v1.1.11/cnapy-windows-installer.zip).
2. Unzip the file into your desired location. You can do this by right-clicking on the file and selecting the option to extract the files.
3. In the location where you unzipped the file, click on "INSTALL_CNAPY.bat". As soon as the installation is finished, the appearing window closes and you can start CNApy either by double-clicking on the newly created CNApy desktop icon or by searching for CNApy through the task bar search.
3. In the location where you unzipped the file, click on "INSTALL_CNAPY.bat"; This installation procedure only works with an active internet conncection. As soon as the installation is finished, the appearing window closes and you can start CNApy either by double-clicking on the newly created CNApy shortcut on your desktop (which also shows CNApy's logo) or the newly created RUN_CNAPY.bat in the folder where INSTALL_CNAPY.bat lies. If CNApy is not starting, this might have been caused by an internet connection problem; Running "INSTALL_CNAPY.bat" again might solve the problem. To uninstall CNApy, double-click on the UNINSTALL_CNAPY.bat in the same folder.

## Assisted installation under Linux and MacOS X

Expand All @@ -72,44 +72,50 @@ Click on the operating system you use:

### Assisted Linux installation

1. Download Miniconda [from here](https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh).
2. Install Miniconda by double-clicking the downloaded file. If the script does not run, right-click on the file, open its settings and select the option to make it executable (alternative: run 'chmod u+x ./Miniconda3-latest-Linux-x86_64.sh' in your terminal). Follow the appearing installation instructions and remember in which folder you install Miniconda. If you already use Anaconda on your computer (for which we also directly provide a conda CNApy package, [see here](#install-cnapy-as-conda-package)), deactivate all installation options which put Miniconda to your console or system PATH to avoid possible problems.
3. Using your file manager, go to the folder where you installed Miniconda. Then, open the appearing sub-folder "condabin".
4. Download the CNApy installation assistant script [from here](https://github.com/cnapy-org/CNApy/releases/download/v1.1.10/cnapy-assistant-script.sh) into the mentioned "condabin" folder.
5. In the file manager, double-click on the newly downloaded installation assistant script which is called "cnapy-assistant-script.sh". If the script does not run, right-click on the file, open its settings and select the option to make it executable (alternative: run 'chmod u+x ./cnapy-assistant-script.sh' in your terminal). Wait until CNApy is downloaded and installed.
1. Download Miniforge [from here](https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh).
2. Install Miniforge by double-clicking the downloaded file. If the script does not run, right-click on the file, open its settings and select the option to make it executable (alternative: run 'chmod u+x ./Miniconda3-latest-Linux-x86_64.sh' in your terminal). Follow the appearing installation instructions and remember in which folder you install Miniconda. *Note*: If you already have installed Anaconda on your computer before (for which we also directly provide a conda CNApy package, [see here](#install-cnapy-as-conda-package)), deactivate all installation options which put Miniconda to your console or system PATH to avoid possible problems.
3. Using your file manager, go to the folder where you installed Miniforge. Then, open the appearing sub-folder "condabin".
4. Download the CNApy installation assistant script [from here](https://github.com/cnapy-org/CNApy/releases/download/v1.1.11/cnapy-assistant-script.sh) into the mentioned "condabin" folder.
5. In the file manager, double-click on the newly downloaded installation assistant script which is called "cnapy-assistant-script.sh". If the script does not run, right-click on the file, open its settings and select the option to make it executable or, alternatively, run 'chmod u+x ./cnapy-assistant-script.sh' in your terminal in the mentioned "condabin" folder. Wait until CNApy is downloaded and installed.
6. You can now run CNApy by executing the following two terminal instructions in the mentioned "condabin" folder:

```sh
./conda activate cnapy-1.1.10
./conda activate cnapy-1.1.11
cnapy
```

If you installed Miniforge system-wide, it's also possible to run these commands in any other terminal folder.

### Assisted MacOS X installation

1. If you have a (new) Mac with an ARM processor, such as the M1 or M2, download Miniconda [from here](https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.pkg). If you have an (older) Mac with an Intel processor, download Miniconda [from here](https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.pkg). If you are unsure which processor your Mac has, click on the Apple menu in the upper-left of your screen and choose "About This Mac".
2. Install Miniconda by double-clicking the downloaded file. Follow the appearing installation instructions and remember in which folder you install Miniconda. If you already use Anaconda on your computer (for which we directly provide a conda CNApy package, [see here](#install-cnapy-as-conda-package)), deactivate all installation options which put Miniconda to your console or system PATH to avoid possible problems
1. If you have a (new) Mac with an ARM processor, such as the M1, M2 or M3, download Miniconda [from here](https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.pkg). If you have an (older) Mac with an Intel processor, download Miniconda [from here](https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.pkg). If you are unsure which processor your Mac has, click on the Apple menu in the upper-left of your screen and choose "About This Mac". *Note*: Currently, if you want to use the CPLEX solver within CNApy, you have to install the Intel processor version of Miniconda regardless of your Mac's processor. This is caused by the lack of a CPLEX ARM Python package ([see also this issue for more details](https://github.com/cnapy-org/CNApy/issues/491)).
2. Install Miniconda by double-clicking the downloaded file. Follow the appearing installation instructions and remember in which folder you install Miniconda. *Note*: If you already use Anaconda on your computer (for which we directly provide a conda CNApy package, [see here](#install-cnapy-as-conda-package)), deactivate all installation options which put Miniconda to your console or system PATH to avoid possible problems
3. Using Finder, go to the folder where you installed Miniconda. Then, open the appearing sub-folder "condabin".
4. Download the CNApy installation assistant script [from here](https://github.com/cnapy-org/CNApy/releases/download/v1.1.10/cnapy-assistant-script.sh) into the mentioned "condabin" folder.
4. Download the CNApy installation assistant script [from here](https://github.com/cnapy-org/CNApy/releases/download/v1.1.11/cnapy-assistant-script.sh) into the mentioned "condabin" folder.
5. In the file manager, double-click on the newly downloaded installation assistant script which is called "cnapy-installation-script.sh". If the script does not run, right-click on the file, open its settings and select the option to make it executable (alternative: run 'chmod u+x ./cnapy-assistant-script.sh' in your terminal). Wait until CNApy is downloaded and installed.
6. Open the terminal in the mentioned "condabin" folder. You can now run CNApy by executing the following two terminal instructions:

```sh
./conda activate cnapy-1.1.10
./conda activate cnapy-1.1.11
cnapy
```

## Install CNApy as conda package

*Note for Mac users (does not affect Windows or Linux users)*: Currently, if you want to use the CPLEX solver within CNApy, you have to install the Intel processor version of Anaconda/Miniconda/Miniforge regardless of your Mac's processor. This is caused by the lack of a CPLEX ARM Python package ([see also this issue for more details](https://github.com/cnapy-org/CNApy/issues/491)).

*Note for all users*: If you've installed mamba on your system (e.g., with [Miniforge](https://github.com/conda-forge/miniforge)), it is the recommended way to install CNApy as it is much faster than conda. To use mamba, just replace the "conda" command in the following steps with "mamba".

1. Create a conda environment with all dependencies

```sh
conda create -n cnapy-1.1.10 -c Gurobi -c IBMDecisionOptimization -c conda-forge -c cnapy cnapy=1.1.10 --yes
conda create -n cnapy-1.1.11 -c Gurobi -c IBMDecisionOptimization -c conda-forge -c cnapy cnapy=1.1.11 --yes
```

2. Activate the cnapy conda environment

```sh
conda activate cnapy-1.1.10
conda activate cnapy-1.1.11
```

3. Run CNApy within you activated conda environment
Expand All @@ -120,7 +126,7 @@ cnapy

Furthermore, you can also perform the following optional steps:

4. (optional and only recommended if you have already installed CNApy by using conda) If you already have a cnapy environment, e.g., cnapy-1.X.X, you can delete it with the command
4. (optional and only possible if you have already installed CNApy by using conda) If you already have a cnapy environment, e.g., cnapy-1.X.X, you can delete it with the command

```sh
# Here, the Xs stand for the last CNApy version you've installed by using conda
Expand Down
2 changes: 1 addition & 1 deletion cnapy/appdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class AppData(QObject):

def __init__(self):
QObject.__init__(self)
self.version = "cnapy-1.1.10"
self.version = "cnapy-1.1.11"
self.format_version = 2
self.unsaved = False
self.project = ProjectData()
Expand Down
2 changes: 1 addition & 1 deletion constructor/linux/construct.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: CNApy
version: 1.1.10
version: 1.1.11

ignore_duplicate_files: True

Expand Down
4 changes: 2 additions & 2 deletions constructor/win/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ We use conda as package manager to install CNApy. You can use [miniconda](https:

1. Create a conda environment with all dependencies
```sh
conda create -n cnapy-1.1.10 -c conda-forge -c cnapy cnapy=1.1.10
conda create -n cnapy-1.1.11 -c conda-forge -c cnapy cnapy=1.1.11
```

2. Activate the cnapy conda environment
```
conda activate cnapy-1.1.10
conda activate cnapy-1.1.11
```

3. Run CNApy
Expand Down
4 changes: 2 additions & 2 deletions constructor/win/construct.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: CNApy
version: 1.1.10
version: 1.1.11

ignore_duplicate_files: True

Expand All @@ -10,7 +10,7 @@ channels:

specs:
- conda
# - cnapy=1.1.10
# - cnapy=1.1.11
- mamba
- pip
- python=3.8
Expand Down
2 changes: 1 addition & 1 deletion constructor/win/post_install.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
call %~dp0..\Scripts\activate.bat

call mamba install cnapy=1.1.10 -c cnapy -c conda-forge -v --yes
call mamba install cnapy=1.1.11 -c cnapy -c conda-forge -v --yes
call pause
call %~dp0..\Scripts\conda clean --all --yes
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ Everyone is welcome to contribute to CNApy's development. [See our contribution
3. Create a conda environment with all dependencies

```sh
conda create -n cnapy-1.1.10 -c conda-forge -c cnapy cnapy=1.1.10
conda create -n cnapy-1.1.11 -c conda-forge -c cnapy cnapy=1.1.11
```

4. Activate the cnapy conda environment

```sh
conda activate cnapy-1.1.10
conda activate cnapy-1.1.11
```

5. Run CNApy within you activated conda environment
Expand Down
2 changes: 1 addition & 1 deletion recipes/linux/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set version = '1.1.10' %}
{% set version = '1.1.11' %}

package:
name: cnapy
Expand Down
2 changes: 1 addition & 1 deletion recipes/noarch/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set version = '1.1.10' %}
{% set version = '1.1.11' %}

package:
name: cnapy
Expand Down
2 changes: 1 addition & 1 deletion recipes/win/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set version = '1.1.10' %}
{% set version = '1.1.11' %}

package:
name: cnapy
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

setup(
name='cnapy',
version='1.1.10',
version='1.1.11',
url='https://github.com/cnapy-org/CNApy/',
license='GPLv3+',
description='An integrated environment for metabolic network analysis.',
Expand Down
Loading