why poetry is failing at installing a freshly released pypi package? - python-poetry

I want to install the freshly released version 2.4.0 of datasets (https://pypi.org/project/datasets/2.4.0/).
With pip, it works:
$ pip install datasets==2.4.0
With poetry, it fails:
$ poetry add datasets==2.4.0
ValueError
Could not find a matching version of package datasets

Poetry uses PyPi's JSON Api to retrieve necessary metadata. They had some problem yesterday, which is fixed in the meantime. See https://github.com/pypi/warehouse/issues/11949

Related

Cannot install Pip for a fresh Python 3.2 installation "No matching distribution found for pip<8"

I created a fresh Python 3.2.2 installation on Windows 10.
I got get_pip.py from here: https://bootstrap.pypa.io/pip/3.2/
I ran: C:\Python32\python.exe get-pip.py
My output:
Collecting pip<8
Could not find a version that satisfies the requirement pip<8 (from versions: )
No matching distribution found for pip<8
I have other versions of Python and Pip installed. What am I missing?
Instead of https://bootstrap.pypa.io/pip/3.2/
Use https://bootstrap.pypa.io/pip/3.5/
The problem is because you are using an older version of pip.

pip install can't find the latest version advertised by pip search

Trying to install the latest version of pandas on my ubuntu 16.04 through pip install
If I read well the result of this command:
python3 -m pip search pandas
...
pandas (0.25.3) - Powerful data structures for data analysis, time series, and statistics
INSTALLED: 0.24.2
LATEST: 0.25.3
...
I should be able to install version 0.25.3 of that package.
I tried
pip install --upgrade pandas --user, which tells me that I already have the latest version
pip install --upgrade --upgrade-strategy eager pandas --user, that installed up-to-date versions of dependencies, but pandas is still 0.24.2
python3 -m pip install pandas==0.25.3 --user which tells me that specific version can't be found, and provides me with a very long list of available versions stopping indeed at version 0.24.2
Am I misinterpreting something ?
Thanks for your help
If you're using the latest Python 3 available by default with Ubuntu 16.04 (3.5.1), it isn't compatible with the 0.25.x release of pandas according to the release notes. You can see some related discussion here.
To see this from pip, you can run the install command using -v and pip will indicate that some links are being ignored because of an incompatible Python version.
You have a few options:
Use a PPA that provides more recent Python 3 versions for 16.04, like deadsnakes
Use pyenv

How to install AutoKeras on aws-ec2

I tried to install autokeras on aws ec2 (p2.xlarge) with the environment python 3.6 & tensorflow. I get following error after "pip install autokeras":
tensorflow 1.10.0 has requirement numpy<=1.14.5,>=1.13.3, but you'll have numpy 1.15.4 which is incompatible.
Installing collected packages: imageio, autokeras
Found existing installation: imageio 2.3.0
Cannot uninstall 'imageio'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
I uninstalled numpy 1.15.4 and installed numpy 1.14.5. With "conda list", I can see the numpy has the correct version.
But after "pip install autokeras" I get the same error and numpy 1.15.4 is still there.
Has anyone successfully installed autokeras on aws ec2? What shall I do to install autokeras correctly?
(Maybe the 'imageio' is the next problem?)
Thank you!
I think you need tensorflow 1.14. Here my notes for AutoKeras installation:
Autokeras Installation Notes in the Deep Learning AMI:
We launched a new deep learning AMI with ubuntu.
The deep learning AMI didn't worked using the "tensorflow + keras + py3.6" environment (so no need for a DL AMI probably, you can save space on disk using a normal clean AMI), so we managed o install autokeras doing the following:
Create a new environment with Anaconda: $ conda create -n autokeras python=3.6.
1.1. Remember that only python 3.6 is working with autokeras
Activate virtual env: It didn't work $ conda activate autokeras, but it works using $ source activate autokeras.
installation of all the packages as required by pyimagesearch.
3.1. A new problem arised here, which, long story short, was solved using the next post (note that I chenged the order, since urllib3 needs jsonschema to be installed first):
$ pip uninstall urllib3```
$ pip uninstall jsonschema
$ pip install jsonschema==2.6.0
$ pip install urllib3==1.24.1
3.2. Finally I was able to install all 3 packages:
$ pip install tensorflow # or tensorflow-gpu
$ pip install keras
$ pip install autokeras
3.3. Autokeras worked fine at this point, but it raised a warning:
>>> import autokeras
Better speed can be achieved with apex installed from https://www.github.com/nvidia/apex
So I just went to the webpage and followed the installation steps. Now it works without warnings (so far):
$ git clone https://github.com/NVIDIA/apex
$ cd apex
$ pip install -v --no-cache-dir --global-option="--pyprof" --global-option="--cpp_ext" --global-option="--cuda_ext" ./

How to avoid installing an "install_requires" package of a pip requirement?

When installing with pip from a requirements.txt file, is there a way to override a requirement's dependencies which are installed due to being listed under install_requires in setup.py of the package?
My specific case is south being installed as a dependency of django-paypal, even though I'm using Django 1.8 so I don't want south installed - it just confuses django's own migrate command.

Protocol Buffer: Version Change

I have accidentally installed version 3.0.0 and most of my files naturally gave tons of errors. Now I want to take it back to 2.6.1. I already downloaded 2.6.1 and installed, however when I do protoc --version it still shows libprotoc 3.0.0, which is wrong.
Is there a way to set the version to 2.6.1 or is there a way to uninstall 3.0.0?
Figured it out. One should delete everything regarding google protocol buffers under /local and /include, , and then simple reinstall the other version. After that protoc --version shows the new version.
If you use pip:
pip uninstall protobuf
pip install protobuf==2.6.1

Resources