chaquopy: FAILURE when adding pyproj module in pip

Chaquopy version 12.0.1

This is the python tag in my build.gradle file.

The error comes only when I add pyproj in pip

        python {
            buildPython "C:/Users/User/AppData/Local/Programs/Python/Python38/"
            buildPython "python"
            pip {
                install "pyproj"
            }
            pyc {
                src true
            }

        }

Below error comes when I try to build the app when I add pyproj module

Executing tasks: [:app:assembleDebug] in project C:\Users\Praveen\StudioProjects\GeoSuite

> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:extractPythonBuildPackages UP-TO-DATE

> Task :app:generateDebugPythonRequirements
Chaquopy: Installing for arm64-v8a
Looking in indexes: https://pypi.org/simple, https://chaquo.com/pypi-7.0
Collecting requests
  Using cached https://files.pythonhosted.org/packages/ca/91/6d9b8ccacd0412c08820f72cebaa4f0c0441b5cda699c90f618b6f8a1b42/requests-2.28.1-py3-none-any.whl
Collecting pyproj
  Using cached https://files.pythonhosted.org/packages/aa/d5/492f4284cb88f912d329e8430917ac2f5427833c31843a712cf9dc703471/pyproj-3.4.0.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\Praveen\AppData\Local\Programs\Python\Python38\python.exe' -S -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Praveen\\AppData\\Local\\Temp\\pip-install-eu5vqgtg\\pyproj\\setup.py'"'"'; __file__='"'"'C:\\Users\\Praveen\\AppData\\Local\\Temp\\pip-install-eu5vqgtg\\pyproj\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' --no-user-cfg egg_info --egg-base pip-egg-info
         cwd: C:\Users\Praveen\AppData\Local\Temp\pip-install-eu5vqgtg\pyproj\
    Complete output (1 lines):
    ERROR: Cython.Build.cythonize not found. Cython is required to build pyproj.
    ----------------------------------------
    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Failed to install pyproj from https://files.pythonhosted.org/packages/aa/d5/492f4284cb88f912d329e8430917ac2f5427833c31843a712cf9dc703471/pyproj-3.4.0.tar.gz.
For assistance, please raise an issue at https://github.com/chaquo/chaquopy/issues.
Chaquopy: Exit status 1

Is there any other way to install and build pyproj ?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 3
  • Comments: 18 (8 by maintainers)

Commits related to this issue

Most upvoted comments

pyproj is now available in the public repository. Thanks for the help with building it.

Python packages should not usually have a build.sh file, as this will bypass most of build-wheel’s Android support and attempt to build the package against your own operating system instead.

Those environment variables might not even be necessary, so at first try simply removing the build.sh file and see what happens. If it turns out you do need the variables, you can set them by adding some os.environ lines to setup.py, re-running build-wheel with the --no-unpack option, then saving the changes in a patch file once everything’s working. For details, see https://github.com/chaquo/chaquopy/issues/791.