Skip to content
This repository was archived by the owner on Feb 19, 2026. It is now read-only.
This repository was archived by the owner on Feb 19, 2026. It is now read-only.

build error: /usr/bin/python2: No module named virtualenv #289

Open

Description

@lalo311

I am trying to build syncserver with the make build command, on my RPi 3 with DietPi, and the make build command returns this :

# Install the latest Python 2 compatible setuptools manually:
# https://github.com/mozilla-services/syncserver/issues/239
`which python2 python2.7 python | head -n 1` -m virtualenv --python=`which python2 python2.7 python | head -n 1` ./local --no-setuptools
/usr/bin/python2: No module named virtualenv
make: *** [Makefile:29: local/COMPLETE] Error 1

I'm a beginner with linux and raspberry pi so sorry if I'm acting dumb, also I already tried reinstalling virtualenv with the pip and pip3 install virtualenv command. And when I use the command on the docs website : sudo apt-get install python-dev git-core python-virtualenv g++, I get this :

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'python-dev-is-python2' instead of 'python-dev'
Note, selecting 'git' instead of 'git-core'
Package python-virtualenv is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python-virtualenv' has no installation candidate

Thanks in advance !

Activity

  1. jrconlin commented on Dec 1, 2021

    @jrconlin
    Contributor

    A few possible things:

    1. Python2 is no longer supported by a lot of platforms, so quite a number of them dropped the python-virtualenv package from their installs. You might have to do a search using something like apt search virtualenv and see what shows up. (It may be virtualenv, python-virtualenv, python2-virtualenv or any number of variants)

    2. Because python2 is no longer supported, you may hit other problems trying to install. You might want to consider running syncstorage in a Docker shell like python:2.7-buster (Docker doesn't eat that much more CPU or Memory, but it can eat disk space, so you might want to run docker image prune after to remove unused installation images.

  2. prg318 commented on Jan 2, 2023

    @prg318

    If your OS doesn't bundle python-pip/python-virtualenv, you can install pip manually and then install virtualenv with pip:

    wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
    python2 get-pip.py
    export PATH=$HOME/.local/bin:$PATH
    pip2 install virtualenv
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions