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

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

Open
lalo311 opened this issue Nov 30, 2021 · 2 comments
Open

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

lalo311 opened this issue Nov 30, 2021 · 2 comments

Comments

@lalo311
Copy link

lalo311 commented Nov 30, 2021

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 !

@jrconlin
Copy link
Member

jrconlin commented Dec 1, 2021

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.

@prg318
Copy link

prg318 commented Jan 2, 2023

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants