I started over by deleting the core-workflow directory and then following the setup section. When I go into the venv and run the first command, I get the following log. Note, I was able to continue with the steps after this and do a backport.
(venv) ~/core-workflow$ python -m pip install --upgrade .
Processing /home/cheryl/core-workflow
Collecting appdirs==1.4.2 (from cherry-picker===0.0.0)
Using cached appdirs-1.4.2-py2.py3-none-any.whl
Collecting click==6.7 (from cherry-picker===0.0.0)
Using cached click-6.7-py2.py3-none-any.whl
Collecting packaging==16.8 (from cherry-picker===0.0.0)
Using cached packaging-16.8-py2.py3-none-any.whl
Collecting py==1.4.33 (from cherry-picker===0.0.0)
Using cached py-1.4.33-py2.py3-none-any.whl
Collecting pyparsing==2.1.10 (from cherry-picker===0.0.0)
Using cached pyparsing-2.1.10-py2.py3-none-any.whl
Collecting pytest==3.0.7 (from cherry-picker===0.0.0)
Using cached pytest-3.0.7-py2.py3-none-any.whl
Collecting pytest-cov==2.4.0 (from cherry-picker===0.0.0)
Using cached pytest_cov-2.4.0-py2.py3-none-any.whl
Collecting pytest-mock==1.6.0 (from cherry-picker===0.0.0)
Using cached pytest_mock-1.6.0-py2.py3-none-any.whl
Collecting requests==2.13.0 (from cherry-picker===0.0.0)
Using cached requests-2.13.0-py2.py3-none-any.whl
Collecting six==1.10.0 (from cherry-picker===0.0.0)
Using cached six-1.10.0-py2.py3-none-any.whl
Collecting coverage==4.3.4 (from cherry-picker===0.0.0)
Using cached coverage-4.3.4-cp36-cp36m-manylinux1_x86_64.whl
Collecting setuptools (from pytest==3.0.7->cherry-picker===0.0.0)
Downloading setuptools-36.0.0-py2.py3-none-any.whl (476kB)
100% |鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅| 481kB 1.3MB/s
Building wheels for collected packages: cherry-picker
Running setup.py bdist_wheel for cherry-picker ... error
Complete output from command /home/cheryl/core-workflow/venv/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-_ojgq253-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmphiwgh8trpip-wheel- --python-tag cp36:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for cherry-picker
Running setup.py clean for cherry-picker
Failed to build cherry-picker
Installing collected packages: appdirs, click, pyparsing, six, packaging, py, setuptools, pytest, coverage, pytest-cov, pytest-mock, requests, cherry-picker
Found existing installation: setuptools 20.7.0
Uninstalling setuptools-20.7.0:
Successfully uninstalled setuptools-20.7.0
Running setup.py install for cherry-picker ... done
Successfully installed appdirs-1.4.2 cherry-picker-0.0.0 click-6.7 coverage-4.3.4 packaging-16.8 py-1.4.33 pyparsing-2.1.10 pytest-3.0.7 pytest-cov-2.4.0 pytest-mock-1.6.0 requests-2.13.0 setuptools-36.0.0 six-1.10.0
I'm on Ubuntu 16.04 running command python3.6 to create the venv.
Thanks!
@tiran any idea?
I'm using Mac OS so I'm not getting this error :(
Do you perhaps need to pip install wheel first?
@JelleZijlstra Thanks, Jelle. That's probably it as I don't believe I've used wheel before. Should it also be added to the requirements.txt or to the instructions page? Sorry, I'm new at this and I don't know whether this should be inside or outside the venv.
Not sure, I haven't tried this myself. Perhaps you should try some variations like that and see what works, so the instructions can be amended.
Of course. I'll play with it and see what works. One interesting note I found was on https://packaging.python.org/installing/#install-pip-setuptools-and-wheel
Maybe wheel should be available in a venv by default like pip and setuptools?
I'm curious if it matters which version of pip is used?
I did a pip freeze on my machine earlier and it did not list wheel as a package, but I did not get any error when installing cherry_picker.
By default pip freeze omits pip, setuptools, distribute, and wheel from its output. You need pip freeze --all to list those too.
ah ok I will try that later :) Thanks
So, it ends up that I do already have wheel 0.29.0 outside of the venv, but it didn't get defined inside it. I added wheel==0.29.0 to the requirements.txt and no longer received the error.
Should I ask about adding wheel to venv in python-dev? Or should I just change the requirements.txt file for cherry_picker?
@csabella Just change the requirements.txt file. Newer versions of pip will soon imply wheel being installed thanks to PEP 518 and so this problem will go away naturally.
Actually, I take that back. Typically requirements.txt doesn't include dependencies that are only required for building a package as a wheel, so it can be mentioned in the README but I wouldn't list it as a dependency.
@brettcannon Thank you. I've added a line to the readme. And thanks for pointing out PEP 518.
Could someone enlighten me about this, so hopefully I can write up better setup instruction.
For me (using Mac OS) I didn't need to install wheel.
Is that step necessary for certain OS only? For example is it only necessary for Ubuntu users? What about Windows users?
Or what other factor is at play here?
Thanks~
When I first got the error, I reported it because I thought it might be something that would affect others. However, since then, I've learned that wheel should just work. I've researched the message and found that others with Ubuntu have reported the same problem, so I believe this has a very narrow scope and can probably be removed from the cherry_picker documentation.
The wheel package is only necessary to build a wheel, and so if pip tries to build one using setup.py build bdist_wheel then you need the wheel package for that to succeed. As for why pip is failing in this specific instance I don't know as I thought pip vendored wheel, but I did notice that is an ancient version of setuptools listed in that output, so I also wonder if that's an ancient version of pip which could be triggering an old bug or something (if it isn't then this should be reported upstream to pip as a bug).
Plus if #114 happens then this all becomes moot as you can just upload a wheel there and people just use that instead of a checkout.