# Installation problem, development environment

**URL:** <https://talk.getindico.io/t/installation-problem-development-environment/2067>\
**Category:** General Discussion\
**Created:** [January 7, 2021, 11:43am UTC](https://talk.getindico.io/t/installation-problem-development-environment/2067 "2021-01-07T11:43:36Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tryggvi\_Edwald](https://talk.getindico.io/user_avatar/talk.getindico.io/tryggvi_edwald/32/628_2.png) [@Tryggvi\_Edwald](https://talk.getindico.io/u/Tryggvi_Edwald)\
**Post date:** [January 7, 2021, 11:43am UTC](https://talk.getindico.io/t/installation-problem-development-environment/2067/1 "2021-01-07T11:43:36Z")

</div>

I am installing on a clean (just installed) Ubuntu 18.04(.3), and following the instructions for installation for development on the indico site.  
All goes exactly as expected up to the step:

“pip install -e .”

at which point I get an ERROR:  
ERROR: Package ‘indico’ requires a different Python: 2.7.17 not in ‘~=3.9’

The default Python is indeed 2.7.17, and I am stumped.  
Any helpful ideas?  
Thanks,

---

<div class="post-metadata">

**Author:** ![ThiefMaster](https://talk.getindico.io/user_avatar/talk.getindico.io/thiefmaster/32/509_2.png) [@ThiefMaster](https://talk.getindico.io/u/ThiefMaster)\
**Post date:** [January 7, 2021, 11:46am UTC](https://talk.getindico.io/t/installation-problem-development-environment/2067/2 "2021-01-07T11:46:50Z")

</div>

Use the `2.3-maintenance` branch if you want to develop on the stable version. `master` is for Indico 3 which requires Python 3.9.

---

<div class="post-metadata">

**Author:** ![Tryggvi\_Edwald](https://talk.getindico.io/user_avatar/talk.getindico.io/tryggvi_edwald/32/628_2.png) [@Tryggvi\_Edwald](https://talk.getindico.io/u/Tryggvi_Edwald)\
**Post date:** [January 7, 2021, 1:08pm UTC](https://talk.getindico.io/t/installation-problem-development-environment/2067/3 "2021-01-07T13:08:22Z")

</div>

Thanks for that helpful hint.

This opens up a lot of questions, however, about the feasibility of developing  
agains the stable (2.3) version:  
-is version 3 coming soon (ie. within the next 6 months)?  
-are there structural differences between versions 2.3 and 3 that would render  
any halfway (or even fully) developed 2.3-plugins useless?

- etc.

Nobody wants to waste time developing for /dev/null.

regards

---

<div class="post-metadata">

**Author:** ![ThiefMaster](https://talk.getindico.io/user_avatar/talk.getindico.io/thiefmaster/32/509_2.png) [@ThiefMaster](https://talk.getindico.io/u/ThiefMaster)\
**Post date:** [January 7, 2021, 1:12pm UTC](https://talk.getindico.io/t/installation-problem-development-environment/2067/4 "2021-01-07T13:12:33Z")

</div>

> is version 3 coming soon (ie. within the next 6 months)?

Certainly. More like within the next 2 months I hope.

> are there structural differences between versions 2.3 and 3 that would render any halfway (or even fully) developed 2.3-plugins useless?

No. In fact, when porting the Zoom plugin [this is all that needed to be changed](https://github.com/indico/indico-plugins/commit/a23e362d18a942efe37c4f33959ec3d7f127701d). And the majority was fully automated by using `modernize --no-diffs -n -w -x import vc_zoom/`, then `pyupgrade --py38-plus vc_zoom/**/*.py` and some cleanups (removing unused six imports, isort, flake8) plus minor bugfixes (for some reason a case of `viewitems()` didn’t get automatically replaced with `items()`).

---

<div class="post-metadata">

**Author:** ![D\_S](https://talk.getindico.io/letter_avatar_proxy/v4/letter/d/2bfe46/32.png) [@D\_S](https://talk.getindico.io/u/D_S)\
**Post date:** [February 20, 2022, 6:50pm UTC](https://talk.getindico.io/t/installation-problem-development-environment/2067/5 "2022-02-20T18:50:05Z")

</div>

I am trying to install the Development version of Indico by following the instructions provided on [this](https://docs.getindico.io/en/stable/installation/development/) page.

I got two errors. The first one was with venv being not compatible. I ran `sudo apt-get install python3-venv` and it got fixed.

Now I have python3.8-venv.

When I run `pip install -e '.[dev]'`, I get `ERROR: Package 'indico' requires a different Python: 3.8.10 not in '~=3.9.0'`.

I have tried different ways to fix this but none works.

---

<div class="post-metadata">

**Author:** ![ThiefMaster](https://talk.getindico.io/user_avatar/talk.getindico.io/thiefmaster/32/509_2.png) [@ThiefMaster](https://talk.getindico.io/u/ThiefMaster)\
**Post date:** [February 20, 2022, 6:55pm UTC](https://talk.getindico.io/t/installation-problem-development-environment/2067/6 "2022-02-20T18:55:20Z")

</div>

You need Python 3.9 - that’s why the setup guide uses pyenv.

---

<div class="post-metadata">

**Author:** ![D\_S](https://talk.getindico.io/letter_avatar_proxy/v4/letter/d/2bfe46/32.png) [@D\_S](https://talk.getindico.io/u/D_S)\
**Post date:** [March 6, 2022, 12:01pm UTC](https://talk.getindico.io/t/installation-problem-development-environment/2067/7 "2022-03-06T12:01:53Z")

</div>

I am really sorry to do this. I am having problem just setting up the pyenv, giving me the above error. What am I doing wrong.

```auto
# Install Dependencies
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \
libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl

# Intall Pyenv
curl https://pyenv.run | bash

export PATH="$HOME/.pyenv/bin:$PATH"
export PATH="$PYENV_ROOT/bin:$PATH"

if command -v pyenv 1>/dev/null 2>&1; then
  eval "$(pyenv init -)"
fi

exec "$SHELL" # Or just restart your terminal

pyenv install --list | grep " 3\.[678]"

mkdir -p ~/dev/indico/data

cd ~/dev/indico
pyenv install 3.9.10

pyenv local 3.9.10

apt install python3.9-venv

python -m venv env

```

after adding the repo and plug ins dir

```auto
source ./env/bin/activate
pip install -U pip setuptools wheel

cd src
pip install -e '.[dev]'

```

**I get**

```auto
ERROR: Package 'indico' requires a different Python: 3.8.10 not in '~=3.9.0'.

```

I tried several solutions including:

- Delete system Python installations

- set Pyenv global as well as local to 3.9.10

No success.

---

<div class="post-metadata">

**Author:** ![ThiefMaster](https://talk.getindico.io/user_avatar/talk.getindico.io/thiefmaster/32/509_2.png) [@ThiefMaster](https://talk.getindico.io/u/ThiefMaster)\
**Post date:** [March 6, 2022, 12:06pm UTC](https://talk.getindico.io/t/installation-problem-development-environment/2067/8 "2022-03-06T12:06:25Z")

</div>

Sounds like your pyenv isn’t active… how does your `$PATH` look like? And without the venv etc, what does `python -V` tell you? It should be `Python 3.9.*`

`apt install python3.9-venv` is not needed btw.

---

<div class="post-metadata">

**Author:** ![D\_S](https://talk.getindico.io/letter_avatar_proxy/v4/letter/d/2bfe46/32.png) [@D\_S](https://talk.getindico.io/u/D_S)\
**Post date:** [March 6, 2022, 1:09pm UTC](https://talk.getindico.io/t/installation-problem-development-environment/2067/9 "2022-03-06T13:09:18Z")

</div>

I did

```auto
alias python=/home/vagrant/.pyenv/versions/3.9.10/bin/python

```

Now python -V gives me **3.9.10**

If I do not install venv separately, I get

```auto
Error: [Errno 71] Protocol error: 'lib' -> '/home/vagrant/dev/env/lib64'

```

$PATH outputs this

```auto
bash: /home/vagrant/.pyenv/plugins/pyenv-virtualenv/shims:/home/vagrant/.pyenv/bin:/home/vagrant/.pyenv/plugins/pyenv-virtualenv/shims:/home/vagrant/.pyenv/bin:/home/vagrant/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin: No such file or directory

```

---

<div class="post-metadata">

**Author:** ![ThiefMaster](https://talk.getindico.io/user_avatar/talk.getindico.io/thiefmaster/32/509_2.png) [@ThiefMaster](https://talk.getindico.io/u/ThiefMaster)\
**Post date:** [March 6, 2022, 1:12pm UTC](https://talk.getindico.io/t/installation-problem-development-environment/2067/10 "2022-03-06T13:12:37Z")

</div>

I think there must be something wrong with your environment. Unfortunately it’s hard to debug such things without having a shell in that environment, but I’d have a look at the docs on [https://github.com/pyenv/pyenv/](https://github.com/pyenv/pyenv/) whether you can find anything useful. In any case I recommend making sure hat pyenv is working correctly before doing any steps regarding Indico.

PS: If your distribution has Python 3.9, you could even skip pyenv altogether - in that case using `python3.9 -m venv ...` should create a virtual environment using Python 3.9.

---

<div class="post-metadata">

**Author:** ![D\_S](https://talk.getindico.io/letter_avatar_proxy/v4/letter/d/2bfe46/32.png) [@D\_S](https://talk.getindico.io/u/D_S)\
**Post date:** [March 6, 2022, 1:14pm UTC](https://talk.getindico.io/t/installation-problem-development-environment/2067/11 "2022-03-06T13:14:58Z")

</div>

Cool. I’ll try that. I’ll try different servers too. The problem might even be with Vagrant. Thank you for your valuable support. 🤜
