Failed building wheel for pyarrow in pypy3 interpreter - python

I am installing streamlit with pypy3 as interpreter in pycharm and stuck at this ERROR: Failed building wheel for pyarrow
I tried every solutions found on the web related with pyarrow, but seems like all solutions posted are for python as interpreter and not for pypy. If you guys have any solution, please let me know.
Command : pip install streamlit
Operating system : ubuntu 22.04
pypy3 version : 7.3.9
Traceback (most recent call last):
File "/home/lungsang/Desktop/streamlit/.env/bin/cmake", line 5, in <module>
from cmake import cmake
ModuleNotFoundError: No module named 'cmake'
error: command '/home/lungsang/Desktop/streamlit/.env/bin/cmake' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pyarrow
Failed to build pyarrow
ERROR: Could not build wheels for pyarrow, which is required to install pyproject.toml-based projects
I have installed cmake before running the command.

You need to pypy3 -m pip install cmake. With that, I am not sure this will work. Even if it does, pyarrow is a c++-based project, so the PyPy python JIT will have a hard time finding opportunities to speed up python code. Additionally, the need to emulate the CPython interactions between python and C mean the code may actually run slower under PyPy than under CPython, if you can get it to run at all.

Seems like currently pyarrow can't be use with pypy.
https://github.com/apache/arrow/issues/2089

Related

Poetry add dependency that uses cython

I have a project which needs to depend on the latest commit of pysam, because I'm working in python 3.11.
This means building the package from source, so I do the following:
poetry add git+https://github.com/pysam-developers/pysam
However, I get an error which I think boils down to poetry not including cython in the build environment:
Unable to determine package info for path: /Users/agreen/Library/Caches/pypoetry/virtualenvs/rnacentral-pipeline-GU-1IkEM-py3.11/src/pysam
Fallback egg_info generation failed.
Command ['/var/folders/sg/3858brmd79z4rz781g0q__940000gp/T/tmpw8auvhsm/.venv/bin/python', 'setup.py', 'egg_info'] errored with the following return code 1, and output:
# pysam: no cython available - using pre-compiled C
Traceback (most recent call last):
File "/Users/agreen/Library/Caches/pypoetry/virtualenvs/rnacentral-pipeline-GU-1IkEM-py3.11/src/pysam/setup.py", line 345, in <module>
raise ValueError(
ValueError: no cython installed, but can not find pysam/libchtslib.c.Make sure that cython is installed when building from the repository
Cython is definitely installed, its in the pyproject.toml, and I can call it from the poetry shell, or import it in a python started in the poetry virtualenv. However, If I use the python from the command poetry is running, then indeed cython is not available.
I think I'm missing some configuration of the build, or some extra option to poetry add. The documentation isn't particularly clear about this use of cython - as far as I can tell it's all about using cython in the package I'm writing, which is not quite what I want.
Cython is a build dependency of pysam, but apparently pysam does not have a pyproject.toml and thus does not declare its build dependencies (Cython and maybe others). So this is a dead end.
If I were you I would build a wheel of pysam myself and tell Poetry to use this wheel until pysam releases wheels for Python 3.11 on PyPI themselves. Or I would use Python 3.10.
It seems like it is being worked on: https://github.com/pysam-developers/pysam/pull/1168

Can't install dbt-snowflake; "No module named 'cmake'"

(Context: Barely a novice at Terminal, know some SQL, don't know Python)
I'm taking a course on dbt, have my own Snowflake set up, and I'm trying to install dbt-snowflake on Mac. Attempting to run:
pip install dbt-snowflake
This fails, and it returns:
`
Traceback (most recent call last):
File "/Users/xxxx/course/venv/bin/cmake", line 5, in <module>
from cmake import cmake
ModuleNotFoundError: No module named 'cmake'
error: command '/Users/xxxx/course/venv/bin/cmake' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pyarrow
Failed to build pyarrow
ERROR: Could not build wheels for pyarrow, which is required to install pyproject.toml-based projects
`
I once successfully changed Python version in virtual environment to 3.9 to see whether that was the problem (but I can't replicate how I changed it), that didn't solve the problem, and currently it's back to 3.11.
Have installed multiple versions of snowflake (3.7, 3.9, 3.11). I don't really understand how this works in context of everything.
I have tried deleting and recreating virtual environments (under same name, venv)
uninstalled and reinstalled cmake (pip install --upgrade cmake); this is version 3.25.0
I don't understand how I can have cmake installed and be told there is no module named 'cmake'.
Is there a particular version of Python I should be running, and if so, how do I reliably change that in virtual environments and different directories?
EDIT TO ADDRESS A COMMENT: I installed Python versions via terminal brew install python#3.9

ERROR: Could not build wheels for spacy, which is required to install pyproject.toml-based projects

Hi Guys, I am trying to install spacy model == 2.3.5 but I am getting this error, please help me!
Try using python 3.6-3.9 instead, where there are binary wheels for pip install to use instead of having to compile from source.
(This is a conflict with python 3.10 and some generated .cpp files in the source package. Python 3.10 wasn't released yet when this version was published.)
I had the similar error while executing pip install -r requirements.txt but for aiohttp module:
socket.c -o build/temp.linux-armv8l-cpython-311/aiohttp/_websocket.o
aiohttp/_websocket.c:198:12: fatal error: 'longintrepr.h' file not found
#include "longintrepr.h"
^~~~~~~ 1 error generated.
error: command '/data/data/com.termux/files/usr/bin/arm-linux-androideabi-clang'
failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for aiohttp
Failed to build aiohttp
ERROR: Could not build wheels for aiohttp, which is required to install
pyproject.toml-based projects
Just in case I will leave here solution to my error. This error is specific to Python 3.11 version. On Python with 3.10.6 version installation went fine.
To solve it I needed to update requirements.txt.
Not working versions of modules with Python 3.11:
aiohttp==3.8.1
yarl==1.4.2
frozenlist==1.3.0
Working versions:
aiohttp==3.8.2
yarl==1.8.1
frozenlist==1.3.1
Links to the corresponding issues with fixes:
https://github.com/aio-libs/aiohttp/issues/6600
https://github.com/aio-libs/yarl/issues/706
https://github.com/aio-libs/frozenlist/issues/305
Try using:
!pip install spacy==2.3.5
Do not give space between == and 2.3.5
If you give any space between equal sign and version, it may give error.

pip version error with installed package

I'm attempting to install a package I recently create into a Heroku app. It seems that Heroku uses an older version of pip which prevents my package from installing correctly. I repeated the process with repl.it to see what happens and here is what I get:
Repl.it: Installing fresh packages
Repl.it: zoho_crm
Collecting zoho_crm
Downloading
https://files.pythonhosted.org/packages/8e/73/a1464dd121fec9579c724de6b9b3243ea733fb85d441b928ff467ec1328f/zoho_crm-0.5.tar.gz
Building wheels for collected packages: zoho-crm
Running setup.py bdist_wheel for zoho-crm: started
Running setup.py bdist_wheel for zoho-crm: finished with status 'done'
Stored in directory: /home/runner/.cache/pip/wheels/46/66/f9/c9604984f6670461c451dd9431105760405d06c658d3b44f01
Successfully built zoho-crm
Installing collected packages: zoho-crm
Successfully installed zoho-crm-0.5
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Repl.it: package installation success
Traceback (most recent call last):
File "python", line 1, in <module>
ModuleNotFoundError: No module named 'zoho_crm'
Line 1 of my code (the only line) is import zoho_crm
This is also the same error I get in Heroku.
I have no problems updating pip on my local machine, but the update with these cloud services seems to update but doesn't stick.
Any suggestions?
That version warning is only warning and can be safely ignored now. Your problem has nothing to do with pip, the problem is caused by the broken package zoho_crm — it doesn't contain anything installable, neither python modules nor packages.

Setup script exited with error: Unable to find vcvarsall.bat

I got the folloiwng error while running my script
Traceback (most recent call last):
File "mysql.py", line 2, in <module>
import MySQLdb
ImportError: No module named MySQLdb
Tried to install mysql-python as suggested in No module named MySQLdb but running
into following error ,can anyone suggest how to overcome this error?
C:\Dropbox\scripts>easy_install mysql-python
Searching for mysql-python
Reading http://pypi.python.org/simple/mysql-python/
Best match: MySQL-python 1.2.5
Downloading https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.5.zip#md5=654f75b302db6ed8dc5a898c625e030c
Processing MySQL-python-1.2.5.zip
Running MySQL-python-1.2.5\setup.py -q bdist_egg --dist-dir c:\users\gnakkala\appdata\local\temp\easy_install-kowc5r\MySQL-python-1.2.5\egg-dist-tmp-1gslvq
error: Setup script exited with error: Unable to find vcvarsall.bat
I had a similar issue with getting MySQL-python to install properly and work for me. I tried both easy_install and pip, both had issues with vcvarsall.bat. Below is what I did to solve my problem, which I think might be able to lead you in the right direction. I have a Windows 8 Machine, Python 2.7 installed and running my stuff through eclipse.
Some Background:
When I did an easy install it tries to install MySQL-python 1.2.5 which failed with an error: Unable to find vcvarsall.bat. I did an easy_install of pip and tried the pip install which also failed with a similar error. They both reference vcvarsall.bat which is something to do with visual studio, since I don't have visual studio on my machine, it left me looking for a different solution, which I share below.
The Solution:
Reinstall python 2.7.8 from 2.7.8 from https://www.python.org/download this will add any missing registry settings, which is required by the next install.
Install 1.2.4 from http://pypi.python.org/pypi/MySQL-python/1.2.4
After I did both of those installs I was able to query my MySQL db through eclipse.
1 install wheel
pip install wheel
2 Download .whl file from http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
Ctrl+F, search mysql . you can find :
MySQL-python, a Python database API 2.0 interface for the MySQL database
Mysqlclient is a Python 3 compatible fork of MySQL-python.
MySQL_python-1.2.5-cp27-none-win32.whl
MySQL_python-1.2.5-cp27-none-win_amd64.whl
Mysqlclient, a fork of the MySQL-python interface for the MySQL database.
mysqlclient-1.3.8-cp27-cp27m-win32.whl
mysqlclient-1.3.8-cp27-cp27m-win_amd64.whl
mysqlclient-1.3.8-cp34-cp34m-win32.whl
mysqlclient-1.3.8-cp34-cp34m-win_amd64.whl
mysqlclient-1.3.8-cp35-cp35m-win32.whl
mysqlclient-1.3.8-cp35-cp35m-win_amd64.whl
mysqlclient-1.3.8-cp36-cp36m-win32.whl
mysqlclient-1.3.8-cp36-cp36m-win_amd64.whl

Categories

Resources