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
NumPY 1.17.0rc1 is available to Python 2.7 #13911
Comments
That's interesting. Sounds like a PyPI problem, but maybe there is something more we need to configure. |
What command is azure running to cause this? It seems something like git clone https://github.com/statsmodels/statsmodels
virtualenv /tmp/python2
source /tmp/python2/bin/activate
cd statsmodels
pip -v
# reports pip 19.1.1
pip install -r requirements.txt
# reports Successfully installed numpy-1.16.4 pandas-0.24.2 \
# patsy-0.5.1 python-dateutil-2.8.0 pytz-2019.1 scipy-1.2.2 six-1.12.0 |
Same, but requirements has
|
Can you somehow figure out what versions of python/pip/??? are involved? Without a reproducible isolated environment this is going to be hard to track down |
Python is 2.7. pip is latest since line above is |
Here's a Dockerfile to replicate:
This is the output when building:
|
On Fri, Jul 5, 2019 at 3:24 AM Tim Joseph Dumol ***@***.***> wrote:
Here's a Dockerfile to replicate:
FROM python:2
RUN pip install -U pip && pip install gensim==2.1
There's no --pre in this, that should pick up numpy 1.16.x
Although weirdly gensim says in its setup.py that 1.16.1 is the latest
py2-compatible release:
#
# 1.11.3 is the oldest version of numpy that we support, for historical
reasons.
# 1.16.1 is the last numpy version to support Py2.
#
# Similarly, 4.6.4 is the last pytest version to support Py2.
#
# https://docs.scipy.org/doc/numpy/release.html
# https://docs.pytest.org/en/latest/py27-py34-deprecation.html
#
if PY2:
NUMPY_STR = 'numpy >= 1.11.3, <= 1.16.1'
PYTEST_STR = 'pytest == 4.6.4'
else:
NUMPY_STR = 'numpy >= 1.11.3'
PYTEST_STR = 'pytest'
This is the output when building:
…
Collecting gensim==2.1
Downloading https://files.pythonhosted.org/packages/0c/35/0e2dbd6ff005d021ab89bcb35baeeff19bf7a3f30f75f98820f1d2876b39/gensim-2.1.0.tar.gz (15.1MB)
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-Otd0kv/gensim/setup.py", line 294, in <module>
include_package_data=True,
File "/usr/local/lib/python2.7/site-packages/setuptools/__init__.py", line 144, in setup
_install_setup_requires(attrs)
File "/usr/local/lib/python2.7/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 717, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 782, in resolve
replace_conflicting=replace_conflicting
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1065, in best_match
return self.obtain(req, installer)
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1077, in obtain
return installer(requirement)
File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 784, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 679, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 705, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 890, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1158, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1144, in run_setup
run_setup(setup_script, args)
File "/usr/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 253, in run_setup
raise
File "/usr/local/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/local/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 166, in save_modules
saved_exc.resume()
File "/usr/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "/usr/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/usr/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-HdZ5tS/numpy-1.17.0rc1/setup.py", line 31, in <module>
class custom_build_ext(build_ext):
RuntimeError: Python version >= 3.5 required.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#13911?email_source=notifications&email_token=AAAYAGVYUFGGDYCYIE2RG3LP54ONPA5CNFSM4H5XY5SKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZJFKJI#issuecomment-508712229>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAYAGQ3AMSVIGJSDFSGF4TP54ONPANCNFSM4H5XY5SA>
.
|
That's unreleased code, on gensim 3.7.3 (latest released), it's always:
Interestingly, installing gensim 3.7.3 seems to work, whereas installing gensim 2.1.0 doesn't, even though both have upper-bound-less numpy requirement strings. |
Hmm, that definitely points to a Would be good to get some clarity on this before the final 1.17.0 release (but I'm not volunteering, no time in the next week, sorry).
|
@bashtage could you update setuptools (or report the version in play when this fails)? |
If I add an update to setuptools in addition to pip then it works correctly. |
Closing. Please reopen if the issue is still not settled. |
I am still having an issue when I deploy to a Google App Engine Flex Environment.
|
Have you upgraded pip and setuptools? |
@bashtage I don't believe you are able to upgrade setuptools or pip in Google App Engine Flex environment. I could be wrong though. |
Can you pin numpy<=1.16? |
I actually have the following in my requirements.txt: numpy==1.16.1 This is actually installed previous to reverse-geocoder which has the following requirement: install_requires=['numpy>=1.11.0', 'scipy>=0.17.1',] So I am unsure why it even tries to pickup numpy-1.17.0rc1 in the first place. |
I'm also seeing this issue when deploying to Pivotal Cloud Foundry. I can't update the python buildpacks and have numpy pinned to a lower verison in my requirements.txt but thats not being respected when installing pandas |
You cannot update setuptools via |
I am going to have to use a custom runtime for Google Cloud App Engine Flex Environment. I had set the following in my requirements:
However still run into the same issue. A custom runtime seems to be the only viable option at this time. https://cloud.google.com/appengine/docs/flexible/python/customizing-the-python-runtime |
FWIW, the issue is still reproducible with latest setuptools (41.0.1) and pip (19.1.1):
produces:
Yet somehow the same Dockerfile with |
We are installing numpy first, and then installing statsmodels. This seems to work on azure/python 2.7. The relevant lines are:
The log is big, but the key bits are
|
I also solved my issue with Google App Engine Flex by creating a custom run time environment, so I would be able to actually update pip and setuptools. Here is my Dockerfile if anyone is interested, I removed the pinned numpy and reverse-geocoder from my requirements and installed them with the below:
|
I'm not sure if this is a PyPI limitation where availability depends on the most recent release, but 1.17.0rc1 is being made available to Python 2.7.
This is from an Azure run of statsmodels:
The text was updated successfully, but these errors were encountered: