# Galaxy local venv installation error

**URL:** <https://help.galaxyproject.org/t/galaxy-local-venv-installation-error/7486>\
**Category:** Uncategorized\
**Tags:** galaxy-local, python3\
**Created:** [February 7, 2022, 10:59am UTC](https://help.galaxyproject.org/t/galaxy-local-venv-installation-error/7486 "2022-02-07T10:59:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrea\_Furlani](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/andrea_furlani/32/2868_2.png) [@Andrea\_Furlani](https://help.galaxyproject.org/u/Andrea_Furlani)\
**Post date:** [February 7, 2022, 10:59am UTC](https://help.galaxyproject.org/t/galaxy-local-venv-installation-error/7486/1 "2022-02-07T10:59:41Z")

</div>

Hi everyone,  
I’m trying to install Galaxy local on a server with Ubuntu 18.04.4 and python 3.10.2 .  
Following the steps on the Get Galaxy page, I successfully cloned the git repository. Now the problem is that when I try to run galaxy for the first time using `sh run.sh` (or sudo `sh run.sh`) I get the following error:

```auto
Creating Python virtual environment for Galaxy: .venv
using Python: python3
To avoid this, use the --no-create-venv flag or set $GALAXY_VIRTUAL_ENV to an
existing environment before starting Galaxy.
Fetching https://files.pythonhosted.org/packages/source/v/virtualenv/virtualenv-16.7.9.tar.gz
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
  0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 5001k 100 5001k 0 0 25.3M 0 --:--:-- --:--:-- --:--:-- 25.3M
Verifying /tmp/galaxy-virtualenv-pIquIq/virtualenv-16.7.9.tar.gz checksum is 0d62c70883c0342d59c11d0ddac0d954d0431321a41ab20851facf2b222598f3
Using base prefix '/usr'
New python executable in /home/andreaf/galaxy/.venv/bin/python3
Also creating executable in /home/andreaf/galaxy/.venv/bin/python
Traceback (most recent call last):
  File "/tmp/galaxy-virtualenv-pIquIq/virtualenv-16.7.9/virtualenv.py", line 2634, in <module>
    main()
  File "/tmp/galaxy-virtualenv-pIquIq/virtualenv-16.7.9/virtualenv.py", line 860, in main
    create_environment(
  File "/tmp/galaxy-virtualenv-pIquIq/virtualenv-16.7.9/virtualenv.py", line 1162, in create_environment
    install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages=site_packages, clear=clear, symlink=symlink)
  File "/tmp/galaxy-virtualenv-pIquIq/virtualenv-16.7.9/virtualenv.py", line 1721, in install_python
    fix_local_scheme(home_dir, symlink)
  File "/tmp/galaxy-virtualenv-pIquIq/virtualenv-16.7.9/virtualenv.py", line 1807, in fix_local_scheme
    if sysconfig._get_default_scheme() == "posix_local":
AttributeError: module 'sysconfig' has no attribute '_get_default_scheme'. Did you mean: 'get_default_scheme'?

```

How can I fix it?  
Thank you for the help

---

<div class="post-metadata">

**Author:** ![pietro](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/pietro/32/934_2.png) [@pietro](https://help.galaxyproject.org/u/pietro)\
**Post date:** [February 7, 2022, 2:09pm UTC](https://help.galaxyproject.org/t/galaxy-local-venv-installation-error/7486/2 "2022-02-07T14:09:10Z")

</div>

seems a python version problem check the issue at [https://github.com/pypa/pip/issues/8273#issuecomment-870399892](https://github.com/pypa/pip/issues/8273#issuecomment-870399892)  
If you want to install galaxy properly on a local server I suggest you to follow the installation through Ansible [Galaxy Installation with Ansible](https://training.galaxyproject.org/training-material/topics/admin/tutorials/ansible-galaxy/tutorial.html) .  
Alternatively, Galaxy is also available as Docker see [Docker Hub](https://hub.docker.com/r/bgruening/galaxy-stable/)

---

<div class="post-metadata">

**Author:** ![Andrea\_Furlani](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/andrea_furlani/32/2868_2.png) [@Andrea\_Furlani](https://help.galaxyproject.org/u/Andrea_Furlani)\
**Post date:** [February 8, 2022, 10:06am UTC](https://help.galaxyproject.org/t/galaxy-local-venv-installation-error/7486/3 "2022-02-08T10:06:29Z")

</div>

Thank you, I’m trying with ansible but I#M having problems with the requirements.yml file:  
Using it as on the document page results in the following error:

```auto
ERROR! Failed to parse the requirements yml at '/home/andreaf/galaxy/requirements.yml' with the following error:
mapping values are not allowed in this context
  in "b'/home/andreaf/galaxy/requirements.yml'", line 4, column 6

```

Then removing the spaces after “:” yamllint runs fine, but then when using the command ` ansible-galaxy install -p roles -r requirements.yml` I et the following error:

```auto
ERROR! Unexpected Exception, this is probably a bug: 'str' object has no attribute 'keys'

```

That’s my yml file content:

```auto
---
++ b/requirements.yml
@@ -0,0 +1,14 @@
- src:galaxyproject.galaxy
  version:0.9.16
- src:galaxyproject.nginx
  version:0.7.0
- src:galaxyproject.postgresql
  version:1.0.3
- src:natefoo.postgresql_objects
  version:1.1
- src:geerlingguy.pip
  version:2.0.0
- src:uchida.miniconda
  version:0.3.0
- src:usegalaxy_eu.certbot
  version:0.1.5

```

---

<div class="post-metadata">

**Author:** ![pietro](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/pietro/32/934_2.png) [@pietro](https://help.galaxyproject.org/u/pietro)\
**Post date:** [February 8, 2022, 1:21pm UTC](https://help.galaxyproject.org/t/galaxy-local-venv-installation-error/7486/4 "2022-02-08T13:21:22Z")

</div>

I think you have some problem in the requirement.yml

```auto
++ b/requirements.yml
@@ -0,0 +1,14 @@

```

they are not part of the file, check the Ansible documentation at [Installing content — Ansible Documentation](https://galaxy.ansible.com/docs/using/installing.html) for more information about requirement files.

---

<div class="post-metadata">

**Author:** ![Andrea\_Furlani](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/andrea_furlani/32/2868_2.png) [@Andrea\_Furlani](https://help.galaxyproject.org/u/Andrea_Furlani)\
**Post date:** [February 8, 2022, 2:02pm UTC](https://help.galaxyproject.org/t/galaxy-local-venv-installation-error/7486/5 "2022-02-08T14:02:15Z")

</div>

Ok, was just following the guide in the first link and they say to put that code in the requirements.yml file so I don’t get what’s wrong… Should I use something like

```auto
---
roles:
 - src: galaxyproject.galaxy
   version: 0.9.16
 - src: galaxyproject.nginx
   version: 0.7.0
 - src: galaxyproject.postgresql
   version: 1.0.3
 - src: natefoo.postgresql_objects
   version: 1.1
 - src: geerlingguy.pip
   version: 2.0.0
 - src: uchida.miniconda
   version: 0.3.0
 - src: usegalaxy_eu.certbot
   version: 0.1.5

```
