pip3 Install delta-lake-reader[aws] fails on MacOS Mojave - python-3.x

I am trying to install delta-lake-reader[aws] on my MacBook Pro with MacOS Mojave and it is failing. I have Python 3.9.1 installed on my laptop.
$ pip3 install delta-lake-reader[aws]
Collecting delta-lake-reader[aws]
Using cached delta_lake_reader-0.2.2-py3-none-any.whl (7.4 kB)
Collecting pyarrow<3.0.0,>=2.0.0
Using cached pyarrow-2.0.0.tar.gz (58.9 MB)
Installing build dependencies ... |
After that it hangs for a while, then fails with a lot of errors, and finally, it gives the following output before ending:
ERROR: Cannot install delta-lake-reader[aws]==0.1.0, delta-lake-reader[aws]==0.1.1, delta-lake-reader[aws]==0.2.1 and delta-lake-reader[aws]==0.2.2 because these package versions have conflicting dependencies.
The conflict is caused by:
delta-lake-reader[aws] 0.2.2 depends on pyarrow<3.0.0 and >=2.0.0
delta-lake-reader[aws] 0.2.1 depends on pyarrow<3.0.0 and >=2.0.0
delta-lake-reader[aws] 0.1.1 depends on pyarrow<3.0.0 and >=2.0.0
delta-lake-reader[aws] 0.1.0 depends on pyarrow<3.0.0 and >=2.0.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
$
I tried uninstalling pyarrow but it installs 3.0.0 again and fails the same way.
How can I overcome this?

The problem lays in the explicit dependency, that doesn't include pyarrow 3.0.0, but requires 2.x.x version. And pyarrow 2.x.x is not compatible with Python 3.9, that's why your build fails, but it works with Python 3.8, I was able to install it with pip3.8 install 'delta-lake-reader[aws]==0.2.2'. So you have following choice:
Use Python 3.8
Download repository, and make change in the pyproject.toml to use pyarrow 3.0.0, and after that use poetry tool to build wheel
File issue in the project, and wait until author fixes it.
If you don't need additional functionality, then you can use official Delta Lake python package that could be installed with pip install deltalake command

Related

import distutils.command.bdist_wininst as orig

Everything went well while I was trying to create a ros 2 package in Ubuntu 22.04 by following the ros2 documentation, however when I got to the colcon build step, it failed for python packages even though it works for cMake packages.
colcon build --packages-select mypkgpython
...
import distutils.command.bdist_wininst as orig
ModuleNotFoundError: No module named 'distutils.command.bdist_wininst'
knowing that my python version is:
python3 --version
Python 3.10.6
i have tried:
sudo apt-get install python3-distutils:
python3-distutils is already the newest version (3.10.6-1~22.04).
sudo apt-get install python3-apt:
python3-apt is already the newest version (2.4.0).
sudo apt install python3-colcon-common-extensions
python3-colcon-common-extensions is already the newest version(0.3.0-1)
how can i solve this problem?
i expected when i build my python package using
colcon build package
it will be successfully build, so i could work with
The bdist_wininst command was deprecated in Python 3.8 and you are using python 3.10
Its no more found in python3-distutils package .
use
bdist_wheel (wheel packages) instead
or
if you want to run your code as it is downgrade your python to < 3.8
The bdist_wininst format was deprecated in Python 3.8, and the documentation for this format has been removed in Python 3.9. The recommended way to distribute Python packages now is the Wheel format.
you can overcome this error by JUST updating the setuptools
pip install --upgrade setuptools
Note that: Setuptools version 58.2.0 is the last version that works with ROS 2 python packages without any warnings because it is the last version that supports the old installation method, "python setup.py install." This method has been deprecated and replaced by newer, standards-based tools, such as pip and ament.
pip install setuptools==58.2.0

Problem in importing tensorflow_data_validation

I tried to import and use the tensorflow_data_validation library, but I faced this error:
ContextualVersionConflict: (google-api-core 1.25.1 (c:\users\amoosi\anaconda3\lib\site-packages), Requirement.parse('google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5'), {'google-cloud-bigquery-storage'})
I'm using Python 3.9.12
The error is telling you that the package google-api-core has a version conflict with the package google-cloud-bigquery-storage.
The current installed version of google-api-core is 1.25.1, and the error is giving you a list of the accepted versions, which are above the one that you have.
To update type this in a terminal:
pip install --upgrade google-api-core

Installing requirements.txt into virtual environment

I have a directory with scripts *.py that I need to compile on another computer that includes different versions of modules. I opened the terminal in that directory and have created requirements:
pip freeze > requirements.txt
Then I created a vertual environment and tried to installed packages from requirements.txt
virtualenv compilation
source compilation/bin/activate
python3.6 -m pip install -r requirements.txt
It ended with this:
ERROR: Cannot install babel==2.7.0, gitsome==0.8.4 and pytz==2021.1 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested pytz==2021.1
babel 2.7.0 depends on pytz>=2015.7
gitsome 0.8.4 depends on pytz<2017.0 and >=2016.3
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
Why is there a conflict when these packages work in non-virtual python3.6, please? What to do with that, please?
After babel and gitsome upgrade
ERROR: Cannot install babel==2.7.0, gitsome==0.8.4, pandas==1.1.5 and pytz==2016.10 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested pytz==2016.10
babel 2.7.0 depends on pytz>=2015.7
gitsome 0.8.4 depends on pytz<2017.0 and >=2016.3
pandas 1.1.5 depends on pytz>=2017.2
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
Downgrading pytz
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pandas 1.1.5 requires pytz>=2017.2, but you have pytz 2015.7 which is incompatible.
gitsome 0.8.4 requires pytz<2017.0,>=2016.3, but you have pytz 2015.7 which is incompatible.
Successfully installed pytz-2016.10
Removed build tracker: '/tmp/pip-req-tracker-8c5_ezeo'
You may want to try downgrading pytz
pip install -Iv pytz==2017.0
or upgrading babel and gitsome
sudo pip install babel --upgrade
sudo pip install gitsome --upgrade

Why is an older version of sktime getting installed using pip?

I'm trying to install sktime using pip. The latest version in pypi is 0.5.1, however when I install 0.4.3 gets installed. I tried installing using pip3 install sktime==0.5.1, it throws error
Could not find a version that satisfies the requirement sktime==0.5 (from versions: 0.1.dev0, 0.1.0, 0.2.0, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.4.3)
No matching distribution found for sktime==0.5
For future users, relevant details from chat:
Ubuntu 18.0.4
pip 9.0.1
python 3.6.9
The issue here is that the pip version is too old to install any of the wheel files for 0.5.1. manylinux2010 support was added in pip 19.0, according to this issue. To fix this, just upgrade pip to a version >19.
So why does this issue only occur for version 0.5.1 and not any of the previous ones? It's because all of the previous version(for instance, 0.4.3) also provide a source distribution(the .tar.gz) which can be used to build from source as an alternative to wheels. However, this sdist was removed in 0.5.1.

Problems with Install of Cartopy on Python3 MacOS

I have installed the latest versions of Proj and GEOS but still get the following error when Installing Cartopy. Proj and Geos installed fine and I double checked their install.
pip install Cartopy
Collecting Cartopy
Using cached https://files.pythonhosted.org/packages/e5/92/fe8838fa8158931906dfc4f16c5c1436b3dd2daf83592645b179581403ad/Cartopy-0.17.0.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Complete output from command /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/hn/gs9rm9416l72qbz4bsqd0w5r0000gn/T/tmp9zqrg2u1:
ERROR: setup.py:171: UserWarning: Unable to determine GEOS version. Ensure you have 3.3.3 or later installed, or installation may fail.
'.'.join(str(v) for v in GEOS_MIN_VERSION), ))
setup.py:227: UserWarning: Unable to determine Proj version. Ensure you have 4.9.0 or later installed, or installation may fail.
'.'.join(str(v) for v in PROJ_MIN_VERSION), ))
Proj version 0.0.0 is installed, but cartopy requires at least version 4.9.0.
ERROR: Command "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/hn/gs9rm9416l72qbz4bsqd0w5r0000gn/T/tmp9zqrg2u1" failed with error code 1 in /private/var/folders/hn/gs9rm9416l72qbz4bsqd0w5r0000gn/T/pip-install-yh57wjuy/Cartopy
I had the same issue, and fixed it on my machine by installing using conda instead of pip, which is what the project reccomends https://scitools.org.uk/cartopy/docs/latest/installing.html

Resources