-
Notifications
You must be signed in to change notification settings - Fork 142
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: Package 'setuptools' requires a different Python: 2.7.12 not in '>=3.5' #239
Comments
It looks like this is a Python 3 setuptools as it wants Python 3 🤔. Which OS/distribution and how did you install Python (2.7)? |
Thank you for your answer. It's Ubuntu 16.04.7 LTS and Python is installed via the regular distribution package repository. However, as far as I understand, this Python interpreter from the operating system is not being used as an own interpreter and all packages are installed into the |
Yes it uses a virtual environment, I just wanted to compare the OS-level Python setup with ours (and treat the Makefile-internal venv setup as a blackbox), which works fine. I just tested on Debian Stretch and Buster yesterday, which basically is:
and Debian Stretch should match Ubuntu 16.04 pretty much. I didn't try Do build from scratch or try to migrate an existing instance? Just to rule out any left cached files etc and as aside of the |
I see, thank you for the explanation. The mentioned packages are installed on my server, too. I tried both upgrading my existing installation which was working so far (due to the issues with Firefox 80 and OAuth) and with a completely fresh clone of the repo. Both cases resulted in the aforementioned error. |
JFYI: I tried to reproduce the issue on a vanilla Ubuntu 20.04 installation, but there I cannot even get the make script running because $ sudo apt install git make python-dev curl
$ curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py
$ sudo python2 get-pip.py
$ sudo pip install virtualenv
$ git clone https://github.com/mozilla-services/syncserver.git
$ cd syncserver
$ make build
`which python2 python2.7 python | head -n 1` -m virtualenv --python=`which python2 python2.7 python | head -n 1` --no-site-packages ./local
usage: virtualenv [--version] [--with-traceback] [-v | -q] [--app-data APP_DATA] [--reset-app-data] [--upgrade-embed-wheels] [--discovery {builtin}] [-p py] [--creator {builtin,cpython2-posix}] [--seeder {app-data,pip}] [--no-seed]
[--activators comma_sep_list] [--clear] [--system-site-packages] [--symlinks | --copies] [--no-download | --download] [--extra-search-dir d [d ...]] [--pip version] [--wheel version] [--setuptools version] [--no-pip]
[--no-wheel] [--no-setuptools] [--no-periodic-update] [--symlink-app-data] [--prompt prompt] [-h]
dest
virtualenv: error: unrecognized arguments: --no-site-packages
SystemExit: 2
make: *** [Makefile:27: local/COMPLETE] Error 2 |
On Debian Bullseye the issue is even more fundamental, since it does not ship Python 2 anymore via APT repo 😄. Did you try to use the Seems to have been removed with v20: pypa/virtualenv#1681 Ehm, now I see that Ubuntu bionic (18.04) is the last that ships Python 2 packages, can't see them anymore. How did you manage to install |
In principle, Ubuntu 20.04 also does not support Python 2 anymore. However, some Python 2 packages (e.g., |
Ah nice, I didn't recognise that there is a Line 27 in 2b8d19e
@rfk might I ping you here to check whether this deprecated option --no-site-packages can be removed/replaced to gain virtualenv v20 compatibility?
However all not related to your actual issue on Ubuntu 16.04. I'll at least run another test with All Debian APT packages
🈯 No issue. The setuptools install is done without any further output:
Global Python version (vs
🈯 No issue when bootstrapping pip and installing Aside of Python core and virtualenv, everything else should not matter as it's installed within the virtualenv only, right? So I'm a bid puzzled how a |
In case you can work with a Docker container, in order to ease debugging, I've prepared a Docker image for you with which you can reproduce the issue and experiment: docker pull dignative/mozillasync-issue239:latest
docker run -it dignative/mozillasync-issue239:latest
git clone https://github.com/mozilla-services/syncserver.git
cd syncserver
make build The image is based on Ubuntu 16.04 and it exhibits the same error as I could observe on my server:
So the issue seems not to be related to the specific configuration of my server. For your reference, this is the Dockerfile I wrote for the image: FROM ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
ENV HOME /root
RUN apt-get update && apt-get -y install apt-utils
RUN apt-get update && apt-get -y install \
curl \
git \
libmariadb-client-lgpl-dev \
libmysqlclient-dev \
make \
python-dev \
python-virtualenv |
Good to have a clean testing environment. Good to know the error actually happened at a different stage than I thought:
works fine at first, but then later fails after verifying it's there as I just compared the exact build output with mine on Debian Stretch and the installed setuptools version is strangely a different one:
EDIT: Here you go: MichaIng/DietPi#3346
So now we're back on the initial
To compare, my result:
|
Sorry I didn't get a chance to reply to this earlier, but 👍 to removing this; I recall having to make as similar change in one of the upstream repos recently as well. |
All fine, was easy enough to commit directly, thanks for merging so quickly. As of the actual issue here, did you ever faced such, a Python 3 only module/version pulled by Python 2 virtualenv or pip? If the case matches, probably the example of how such issues are now prevented in the first place on piwheels.org can be suggested to other Python repositories. |
@MichaIng Thank you for your extensive testing and debugging! I tried what you suggested on my server:
So, in my case, |
The command is only what That is the bug same mirror: pypa/virtualenv#1493
Ah lol actually in make case the mirror was the same. So there seems to be a difference on another layer between our systems then. I'm a bid puzzled. Let's see if someone in the linked issue has an idea: pypa/virtualenv#1493 (comment) Could you try it this works? 0bc618a Explicit pip install/upgrade: d03e4ec#diff-b67911656ef5d18c4ae36cb6741b7965 |
Thank you! I can confirm that using 0bc618a works for me (N.B.: This commit is not referenced in the Git repository by any branch/tag, this is why I had to manually fetch it.). I am just receiving an "error" (I think it's just a notice despite of the displayed word "error" since both
|
Great. Yes the error due to the changing way how pip resolves dependencies is another topic to take care of. Yes I only made the commit to my own fork so far. Will open a PR: #245 |
I've noticed that the PR has been merged two days ago. I tried again now with the latest version of Thank you very much for your work and the timely fix! |
I am trying to build the most recent version of master (9ef2fb9 as of now) of this repository by issuing
make test
, but I am facing a dependency error:The text was updated successfully, but these errors were encountered: