How can a #defined C value be exposed to Python in a Cython module?

I'd like to make the integer constants (ACTIVE_TAG, etc) defined here: //island management, m_activationState1 #define ACTIVE_TAG 1 #define ISLAND_SLEEPING 2 #define WANTS_DEACTIVATION 3 #define...

Unable to Install with easy_install or pip on mac

I'm trying to install lxml and pycrypto modules using easy_install (and pip) but getting error messages like Running lxml-2.3.4/setup.py -q bdist_egg --dist-dir...

How can I install packages hosted in a private PyPI using setup.py?

I'm trying to write the setup.py install file for a private project, which has both public and private dependencies. The public ones are hosted on PyPI, whereas the private ones are hosted on a...

Collapse multiple submodules to one Cython extension

This setup.py: from distutils.core import setup from distutils.extension import Extension from Cython.Build import cythonize extensions = ( Extension('myext', ['myext/__init__.py', ...

Pycharm Virtulenv "non-zero exit code" after install wheel or module from pip

After installing kivy via a wheel i came upon an error in Pycharm when i refreshed my virtual env for python 3.4. The error is in the section Pycharm: Projects -> Project Interpreter ->...

Call cdef function by name in Cython

I have a bunch of cdef functions in Cython, that are called by a def function in a pyx file, e.g.: cdef inline void myfunc_c(...): (...) return def wrapper(...): myfunc_c(...) ...

Kivy - Error Unable permissions?

I need some help. I'm studying kivy and I use pycharm as IDE for development. To work with kivy I created a virtualenvs with requeriments: kivy = 1.10 Cython = 0.23 Python = 3.5 As for setup I...

Cross-compile extension on Linux for Windows

I've managed to build some DLLs on Linux that are necessary for my Python extension using MinGW. Something along these lines: from setuptools.command.build_py import build_py class...

Distributing cpp files generated by Cython

I'm new to Cython and my goal is to use it as some "translator" which compiles basic python code to c++ code which can be distributed and utilized by other users. I've followed each step in...

Could not install pycocotools in windows: fatal error C1083: Cannot open include file: 'io.h': No such file or directory error:

I'm new to machine learning and have started with a windows 8.1 pc having GeForce GTX 540M. I followed this tutorial to get started with the object detection models. I built my own dataset and...

Python: why do I get an error when I import geopandas?

I try to import geopandas in my jupyter notebook. import geopandas as gp and I get the following error: ImportError:...

WEBP support not installed error with Pillow included in Anaconda

I have written a small code to open webp image in the Anaconda prompt. from PIL import Image im = Image.open('test.webp') It causes the following...

How to fix Cython header error when compiling python script to C

I know how to embed the Python interpreter in my script.c script when using cython on the command line per this SO post. However, unfortunately I'm getting the following errors in the headers of...

Calling Cython function from C code raises segmentation fault

I'm trying to call cython (cdef) function in C program. When the cdef function contains python statements, e.g. print(0.5), or python (def) functions, calling the (cdef) function raises a...

Unable to install grpcio using pip install grpcio

I am getting error while installing grpcio using pip install grpcio on my windows machine.I read here - https://github.com/grpc/grpc/issues/17829 that it may be due to error in a version of...

PyInstaller: StopIteration Error when I import geopandas

I am trying to execute PyInstaller on a my script. I installed all of the required packages and the .exe is succesfully created. But when I execute it on another machine, I get he Following...

OpenCV-python not importing

I am using Pydroid to code in android. Though it is an ARM machine so I downloaded OpenCV-python wheel from PiWheels and successfully installed it using pip. But i can't import OpenCV anyways....

Failed to build pycocotools

I am new to machine learning and I am trying to download the requirements for a repo using pip install -r requirements.txt I am currently using Anaconda (3.7) version 2020.02. All the other...

How to solve: Error installing pandas WinError[123]

When I install pandas using "pip install pandas". It stucks and after a while it throws this Error: ERROR: ERROR: Command errored out with exit status 1: command: 'C:\Users\Tomas...

Im trying to build mediapipe on my jetson nano

So Im trying to build a mediapipe whl file for my jetson nano by following this guide https://github.com/jiuqiant/mediapipe_python_aarch64 I am successful on building it with my raspberry pi 4. By...

Kivy apk built by buildozer crashes soon after displaying presplash screen

I am new to Kivy and using buildozer. However, I've followed the instructions from buildozer.readthedocs and run "buildozer -v android debug deploy run logcat > my_log.txt" as best as I can, yet,...

pip install error when I install fbprophet

(I'm not good at English sorry) I have an error when I install fbprophet for windows command. I already installed pystan and cython. I use Windows 10, python 3.9 version. maybe, Am I having a...

AttributeError: module 'utils' has no attribute 'read'

I'm trying to train a model using PyTorch and I got this error AttributeError: module 'utils' has no attribute 'read' In the main project I have the file utils.pyx and also I'm getting an error in...

grpc import bug on arm linux system - ImportError: cannot import name 'cygrpc' from 'grpc._cython'

I'm trying to get a grpc (grpcio) service to run on an armv7 system running linux (openembedded poky). As our it-dep. doesn't allow us to connect our dev boards to our network/internet I'm ushin...

Problems installing cytoolz on [email protected]

I am trying to install cytoolz in virtualenv: Python version = 3.10.0 Pip version = 21.3.1 After running pip install cytoolz in the activated virtualenv I am getting the following...

Need help to install Kivy

No matter what i try, kivy always fails to install. I can install most other packages but not kivy. I tried it through pycharm, reinstalling python, and trying every command on cmd prompt, it just...

PIP failed to build package cytoolz

I'm trying to install eth-brownie using 'pipx install eth-brownie' but I get an error saying pip failed to build package: cytoolz Some possibly relevant errors from pip install: ...

How can I run Kivy on my Mac with M1 chip

MacOS: Monterey 12.0.1, currently (16-11-21) latest version IDE: Visual Studio Code I want to use Kivy to create some simple desktop app interfaces for a university project. I followed the...

Can't install kivy with Python 3.10.0

I'm new to python. I'm getting an error when installing kivy with *pip install kivy* C:\Users\Acer>pip install kivy Collecting kivy Using cached Kivy-2.0.0.tar.gz (23.7 MB) Installing build...

Why is numba so fast?

I want to write a function which will take an index lefts of shape (N_ROWS,) I want to write a function which will create a matrix out = (N_ROWS, N_COLS) matrix such that out[i, j] = 1 if and only...