Can't install last version of pandas (1.0.3) - python

For last two days, 24/7 I'm trying to deal with the problem of installation of pandas 1.0.3 package within Python 3.6.0. I will try to describe the whole situation below.
In my PyCharm I saw that I can upgrade pandas from 0.25.3 I was using to 1.0.3, but once I tried it an error has occurred.
possibility of an upgrade of pandas
an error
Firstly, I checked the default version of my python in the terminal:
In: python -V
Out: Python 2.7
In: python3 -V
Out: Python 3.6.0
Using this guid I have change the default python version for python 3.6. Which lead to this thing:
In: python -V
Out: Python 3.6.0
But still I can't install/upgrade pandas to version 1.0.3.
I've tried these commands in the terminal:
pip install pandas
pip3 install pandas
pip install pandas==1.0.3
pip3 install pandas==1.0.3
Same commands via sudo
pip install /path_to_wheel
Always I got the same error:
ERROR: Could not find a version that satisfies the requirement pandas==1.0.3 (from versions: 0.1, 0.2b0, 0.2b1, 0.2, 0.3.0b0, 0.3.0b2, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.5.0, 0.6.0, 0.6.1, 0.7.0rc1, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.8.0rc1, 0.8.0rc2, 0.8.0, 0.8.1, 0.9.0, 0.9.1, 0.10.0, 0.10.1, 0.11.0, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.15.0, 0.15.1, 0.15.2, 0.16.0, 0.16.1, 0.16.2, 0.17.0, 0.17.1, 0.18.0, 0.18.1, 0.19.0rc1, 0.19.0, 0.19.1, 0.19.2, 0.20.0rc1, 0.20.0, 0.20.1, 0.20.2, 0.20.3, 0.21.0rc1, 0.21.0, 0.21.1, 0.22.0, 0.23.0rc2, 0.23.0, 0.23.1, 0.23.2, 0.23.3, 0.23.4, 0.24.0rc1, 0.24.0, 0.24.1, 0.24.2, 0.25.0rc0, 0.25.0, 0.25.1, 0.25.2, 0.25.3)
ERROR: No matching distribution found for pandas==1.0.3
Please help. I do not know why it happens :(
UPDATE:
Also not working:
python3 -m pip install /Users/username/Downloads/pandas-1.0.3-cp36-cp36m-macosx_10_9_x86_64.whl
Processing ./Downloads/pandas-1.0.3-cp36-cp36m-macosx_10_9_x86_64.whl
ERROR: Package 'pandas' requires a different Python: 3.6.0 not in '>=3.6.1' –

This is because pandas 1.0.x (and 1.1.0x) requires Python 3.6.1 or later. You are using Python 3.6.0. This can be seen in the error message you get :
ERROR: Package 'pandas' requires a different Python: 3.6.0 not in '>=3.6.1' –
This should be solved if you update your Python version.
You can see here the Python 3.6.1 requirement starting from pandas 1.0.0.

Related

ERROR: No matching distribution found for transformers==4.20.1

I am trying to install this specific version of transformers but I get the error:
pip3 install transformers==4.20.1
ERROR: Could not find a version that satisfies the requirement transformers==4.20.1
from versions: 0.1, 2.0.0, 2.1.0, 2.1.1, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.4.0, 2.4.1,
2.5.0, 2.5.1, 2.6.0, 2.7.0, 2.8.0, 2.9.0, 2.9.1, 2.10.0, 2.11.0, 3.0.0, 3.0.1, 3.0.2,
3.1.0, 3.2.0, 3.3.0, 3.3.1, 3.4.0, 3.5.0, 3.5.1, 4.0.0rc1, 4.0.0, 4.0.1, 4.1.0,
4.1.1, 4.2.0, 4.2.1, 4.2.2, 4.3.0rc1, 4.3.0, 4.3.1, 4.3.2, 4.3.3, 4.4.0, 4.4.1,
4.4.2, 4.5.0, 4.5.1, 4.6.0, 4.6.1, 4.7.0, 4.8.0, 4.8.1, 4.8.2, 4.9.0, 4.9.1, 4.9.2,
4.10.0, 4.10.1, 4.10.2, 4.10.3, 4.11.0, 4.11.1, 4.11.2, 4.11.3, 4.12.0, 4.12.1,
4.12.2, 4.12.3, 4.12.4, 4.12.5, 4.13.0, 4.14.0, 4.14.1, 4.15.0, 4.16.0, 4.16.1,
4.16.2, 4.17.0, 4.18.0)
ERROR: No matching distribution found for transformers==4.20.1
I know the version exists since I have it installed on my local machine. I installing the package on an ubuntu remote machine. The Python version is 3.6.9. How can I get the version I need if it's saying that it doesn't even exist.
The 4.20.1 build does not support Python prior to 3.7. You'll either need to pick an earlier version or upgrade your Python.
You need Python >=3.7. You might also want to upgrade pip:
pip install --upgrade pip
https://pypi.org/project/transformers/4.20.0/

How to use FBProphet within Databricks?

I have tried installing the FBProphet within a Databricks notebook in the following ways:
dbutils.library.installPyPI('FBProphet', version='0.5')
pip install fbprophet
The first line of code has the error:
Py4JJavaError: An error occurred while calling o1552.addIsolatedPyPILibrary.
: org.apache.spark.SparkException: Process List(/local_disk0/pythonVirtualEnvDirs/virtualEnv-d8a840a2-8b99-410b-a9c8-0b04a40153ab/bin/python, /local_disk0/pythonVirtualEnvDirs/virtualEnv-d8a840a2-8b99-410b-a9c8-0b04a40153ab/bin/pip, install, FBProphet==0.5, --disable-pip-version-check) exited with code 1. ERROR: Could not find a version that satisfies the requirement httpstan<4.7,>=4.6 (from pystan>=2.14->FBProphet==0.5) (from versions: 0.6.0, 0.6.1, 0.7.0, 0.7.1, 0.7.2, 0.7.5, 0.7.6, 0.8.0, 0.10.1, 1.0.0, 1.1.0, 1.1.1, 1.1.2, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.1.0, 2.2.0, 2.3.0, 4.0.0, 4.1.0, 4.2.1, 4.3.0, 4.3.1, 4.3.2, 4.4.0, 4.4.1, 4.4.2)
ERROR: No matching distribution found for httpstan<4.7,>=4.6 (from pystan>=2.14->FBProphet==0.5)
And the second line has the error:
com.databricks.backend.daemon.driver.conda.NotebookEnvironmentException: Notebook environment commands (eg %pip) cannot be used in the same notebook as dbutils.library commands. Please ensure your notebook only uses one of these two types of commands, then detach and re-attach the notebook to run this command.
You shouldn't use the first one because from the error:
"dbutils.library APIs are deprecated and will be removed in a future
DBR release. You can use %pip commands to install notebook-scoped
python libraries."
And for the second one, according to the installations instructions on official documentation,
As of v1.0, the package name on PyPI is “prophet”; prior to v1.0 it
was “fbprophet”
So, you should use pip install prophet instead of pip install fbprophet

Pip install failure on Pandas?

When I try to install my project from the requirements.txt file, I run pip install -r requirements.txt and it fails on my pandas dependency. I am not exactly sure why does anyone have any advice?
pip version:
pip 20.0.2 from c:\users\name\appdata\local\programs\python\python35\lib\site-packages\pip (python 3.5)
requirements.txt:
numpy==1.18.2
pandas==1.0.3
python-dateutil==2.8.1
pytz==2019.3
six==1.14.0
Error:
ERROR: Could not find a version that satisfies the requirement pandas==1.0.3 (from -r requirements.txt (line 2)) (from versions: 0.1, 0.2b0, 0.2b1, 0.2, 0.3.0b0, 0.3.0b2, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.5.0, 0.6.0, 0.6.1, 0.7.0rc1, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.8.0rc1, 0.8.0rc2, 0.8.0, 0.8.1, 0.9.0, 0.9.1, 0.10.0, 0.10.1, 0.11.0, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.15.0, 0.15.1, 0.15.2, 0.16.0, 0.16.1, 0.16.2, 0.17.0, 0.17.1, 0.18.0, 0.18.1, 0.19.0rc1, 0.19.0, 0.19.1, 0.19.2, 0.20.0rc1, 0.20.0, 0.20.1, 0.20.2, 0.20.3, 0.21.0rc1, 0.21.0, 0.21.1, 0.22.0, 0.23.0rc2, 0.23.0, 0.23.1, 0.23.2, 0.23.3, 0.23.4, 0.24.0rc1, 0.24.0, 0.24.1, 0.24.2)
ERROR: No matching distribution found for pandas==1.0.3 (from -r requirements.txt (line 2))
Something like that happened to me in the past. I solved it by uninstalling pandas then reinstalling it again. Perhaps you installed pandas long time ago so your version of out of date.
pandas 1.0.0 requires Python 3.6+. The last version that supports Python 3.5 is 0.25.3. Either use the version or upgrade to Python 3.6+ (3.6, 3.7 or 3.8).

tensorflow error when installing turicreate?

When I install turicreate package, it gives me the following error:
Collecting tensorflow>=2.0.0 (from turicreate)
Could not find a version that satisfies the requirement tensorflow>=2.0.0 (from turicreate) (from versions: 0.12.1, 1.0.0, 1.0.1, 1.1.0rc0, 1.1.0rc1, 1.1.0rc2, 1.1.0, 1.2.0rc0, 1.2.0rc1, 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0rc0, 1.3.0rc1, 1.3.0rc2, 1.3.0, 1.4.0rc0, 1.4.0rc1, 1.4.0, 1.4.1, 1.5.0rc0, 1.5.0rc1, 1.5.0, 1.5.1, 1.6.0rc0, 1.6.0rc1, 1.6.0, 1.7.0rc0, 1.7.0rc1, 1.7.0, 1.7.1, 1.8.0rc0, 1.8.0rc1, 1.8.0, 1.9.0rc0, 1.9.0rc1, 1.9.0rc2, 1.9.0, 1.10.0rc0, 1.10.0rc1, 1.10.0, 1.10.1, 1.11.0rc0, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.12.0rc0, 1.12.0rc1, 1.12.0rc2, 1.12.0, 1.12.2, 1.12.3, 1.13.0rc0, 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 2.0.0a0, 2.0.0b0, 2.0.0b1)
No matching distribution found for tensorflow>=2.0.0 (from turicreate)
which I encountered the same when installing tensorflow 2.0.0.
And I managed to install tensorflow2 with modification to the version(add a 'a0','b0','b1' after '2.0.0') using pip3 install tensorflow==2.0.0a0. However, I still cannot pass the installation of turicreate even with tensorflow2.0.0a0 installed and result in the same 'tensorflow error' shown above.
I am using python 3.6, numpy 1.16.5.
Can you please help me out?
Upgrade pip
# On Linux or macOS:
pip3 install -U pip
# On Windows:
python -m pip3 install -U pip
Install turicreate
pip3 install turicreate
This will solve your problem
I was having the same problem when I tried to install turicreate on the Jupyter Docker image that comes with some data science libraries loaded:
Image: jupyter/scipy-notebook
Packages: pandas, numexpr, matplotlib, scipy, seaborn, scikit-learn, scikit-image, sympy, cython, patsy, statsmodel, cloudpickle, dill, numba, bokeh, sqlalchemy, hdf5, vincent, beautifulsoup, protobuf, and xlrd packages
Error message:
Could not find a version that satisfies the requirement tensorflow>=2.0.0 (from turicreate) (from versions: 0.12.1, 1.0.0, 1.0.1, 1.1.0rc0, 1.1.0rc1, 1.1.0rc2, 1.1.0, 1.2.0rc0, 1.2.0rc1, 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0rc0, 1.3.0rc1, 1.3.0rc2, 1.3.0, 1.4.0rc0, 1.4.0rc1, 1.4.0, 1.4.1, 1.5.0rc0, 1.5.0rc1, 1.5.0, 1.5.1, 1.6.0rc0, 1.6.0rc1, 1.6.0, 1.7.0rc0, 1.7.0rc1, 1.7.0, 1.7.1, 1.8.0rc0, 1.8.0rc1, 1.8.0, 1.9.0rc0, 1.9.0rc1, 1.9.0rc2, 1.9.0, 1.10.0rc0, 1.10.0rc1, 1.10.0, 1.10.1, 1.11.0rc0, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.12.0rc0, 1.12.0rc1, 1.12.0rc2, 1.12.0, 1.12.2, 1.12.3, 1.13.0rc0, 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 2.0.0a0, 2.0.0b0, 2.0.0b1)
No matching distribution found for tensorflow>=2.0.0 (from turicreate)
However, when I took the basic (stripped) Jupyter image, it worked:
Image: jupyter/base-notebook
Packages: git, emacs, jed, nano, tzdata, and unzip
Installation instructions for turicreate:
from __future__ import print_function
import sys
!{sys.executable} -m pip install turicreate
Output:
Successfully installed absl-py-0.9.0 astor-0.8.1 cachetools-4.0.0 coremltools-3.1 gast-0.2.2 google-auth-1.10.0 google-auth-oauthlib-0.4.1 google-pasta-0.1.8 grpcio-1.26.0 h5py-2.10.0 keras-applications-1.0.8 keras-preprocessing-1.1.0 llvmlite-0.30.0 markdown-3.1.1 numba-0.46.0 numpy-1.16.4 opt-einsum-3.1.0 pandas-0.25.3 pillow-6.2.1 prettytable-0.7.2 protobuf-3.11.2 pyasn1-0.4.8 pyasn1-modules-0.2.7 pytz-2019.3 requests-oauthlib-1.3.0 resampy-0.2.1 rsa-4.0 scipy-1.4.1 tensorboard-2.0.2 tensorflow-2.0.0 tensorflow-estimator-2.0.1 termcolor-1.1.0 turicreate-6.0 werkzeug-0.16.0 wrapt-1.11.2
So, I guess the problem is that some of the libraries that you have installed in your environment conflict with turicreate. Perhaps you should try to use the above mentioned Docker image or try to create a virtual environment so you work in isolation (not tested this).
Info on the different Docker images:
https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html#jupyter-scipy-notebook
Turicreate installation instructions where they comment on the virtual environment:
https://github.com/apple/turicreate#installation
Firstly, give try to a latest version of pip pip3 install -U pip, usually, it has less problems than previous.
Otherwise, if above fails, you can try running with pip3 install --no-deps turicreate to get past the cryptic error.
You'll need to install the dependencies manually. All 110 of them.
You can generate a list of them with something along these lines:
import os;
s = os.popen('pip3 freeze turicreate').read()
for q in [x.split('==')[0] for x in s.split('\n')]:
os.system('echo {} >> t.tmp'.format(q)
Then they can be installed with pip install -r t.tmp or for x in $(cat t.tmp); do pip3 install $x; done
I'm not sure how the funtionality related to the tensorflow or any other failed package is affected by this but I've managed to get simple sframes working with this method.
Then I've upgraded the pip and all the libs that weren't working installed without a problem.
Try upgrading pip. Tensorflow 2.0 needs newer versions of pip to be installed.
Personally this worked,
upgrade pip
installed tf2.0
installed turicreate.

Why does pip behave differently locally vs in a docker container?

So I have a requirements file that looks like this -
aiohttp==3.5.4
aioredis==1.2.0
amqp==2.4.2
asn1crypto==0.24.0
astroid==2.1.0
async-timeout==3.0.1
atomicwrites==1.3.0
# so on...
I run
pip install -r requirements.txt
locally and everything works fine.
However, when I use this Dockerfile
FROM python:2.7-slim
WORKDIR /app
COPY . /app
# Install any needed packages specified in requirements.txt
RUN pip install -r requirements.txt
EXPOSE 80
ENV FLASK_APP=iterative.py
ENV FLASK_ENV=development
RUN pip install gunicorn
CMD ["gunicorn -w 4 app:app"]
I get this error -
Could not find a version that satisfies the requirement aiohttp==3.5.4 (from -r requirements.txt (line 1)) (from versions: 0.1, 0.2, 0.3, 0.4, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.5.0, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.10.0, 0.10.1, 0.10.2, 0.11.0, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.14.2, 0.14.3, 0.14.4, 0.15.0, 0.15.1, 0.15.2, 0.15.3, 0.16.0, 0.16.1, 0.16.2, 0.16.3, 0.16.4, 0.16.5, 0.16.6, 0.17.0, 0.17.1, 0.17.2, 0.17.3, 0.17.4, 0.18.0, 0.18.1, 0.18.2, 0.18.3, 0.18.4, 0.19.0, 0.20.0, 0.20.1, 0.20.2, 0.21.0, 0.21.1, 0.21.2, 0.21.4, 0.21.5, 0.21.6, 0.22.0a0, 0.22.0b0, 0.22.0b1, 0.22.0b2, 0.22.0b3, 0.22.0b4, 0.22.0b5, 0.22.0b6, 0.22.0, 0.22.1, 0.22.2, 0.22.3, 0.22.4, 0.22.5, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.5, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 2.0.0rc1, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6.post1, 2.0.7, 2.1.0, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.3.0a4, 2.3.0, 2.3.1, 2.3.2b2)
No matching distribution found for aiohttp==3.5.4 (from -r requirements.txt (line 1))
Moreover, my python version locally is 2.7.15.
If I add
RUN pip install aiohttp
I get this error when building
aiohttp requires Python '>=3.4.2' but the running Python is 2.7.16
So I have two questions -
Why does my pip install work correctly locally, but when building my docker image?
Why does aiohttp require python version >=3.4.2, when I run in Docker, but not locally?
Thanks
Ok I solved this.
Ostensibly, the solution is to use a more modern version of python - I ended up using 3.6.
I think what was happening though was that pip was using python3, while python command lined was version 2.7.15.

Categories