question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to install using pip on Cygwin

See original GitHub issue

Installation method/steps

  • First, PROJ was installed using the Cygwin package installation tool.
  • Then attempted to install pyproj using pip: pip3 install pyproj

Environment Information

  • pyproj version you are attempting to install = 3.3.1
  • PROJ version = Rel. 9.0.1, June 15th, 2022
  • Python version = 3.9.10 (main, Jan 20 2022, 21:37:52) [GCC 11.2.0]
  • Operation System Information = CYGWIN_NT-10.0-19044-3.3.5-341.x86_64-x86_64-64bit-WindowsPE

Output

Collecting pyproj
  Using cached pyproj-3.3.1.tar.gz (219 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: certifi in /usr/local/lib/python3.9/site-packages/certifi-2022.6.15-py3.9.egg (from pyproj) (2022.6.15)
Building wheels for collected packages: pyproj
  Building wheel for pyproj (pyproject.toml) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3.9.exe /usr/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp9ncdrpiz
       cwd: /tmp/pip-install-adnywux0/pyproj_fcd15a1a2bd6421a880e98878bf6fbc6
  Complete output (49 lines):
  /tmp/pip-build-env-5yak_mea/overlay/lib/python3.9/site-packages/setuptools/config/setupcfg.py:463: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
    warnings.warn(msg, warning_class)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.cygwin-3.3.5-x86_64-cpython-39
  creating build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  copying pyproj/aoi.py -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  copying pyproj/datadir.py -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  copying pyproj/enums.py -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  copying pyproj/exceptions.py -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  copying pyproj/geod.py -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  copying pyproj/network.py -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  copying pyproj/proj.py -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  copying pyproj/sync.py -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  copying pyproj/transformer.py -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  copying pyproj/utils.py -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  copying pyproj/_show_versions.py -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  copying pyproj/__init__.py -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  copying pyproj/__main__.py -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  creating build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj/crs
  copying pyproj/crs/coordinate_operation.py -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj/crs
  copying pyproj/crs/coordinate_system.py -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj/crs
  copying pyproj/crs/crs.py -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj/crs
  copying pyproj/crs/datum.py -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj/crs
  copying pyproj/crs/enums.py -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj/crs
  copying pyproj/crs/_cf1x8.py -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj/crs
  copying pyproj/crs/__init__.py -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj/crs
  copying pyproj/database.pyi -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  copying pyproj/list.pyi -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  copying pyproj/_compat.pyi -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  copying pyproj/_crs.pyi -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  copying pyproj/_datadir.pyi -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  copying pyproj/_geod.pyi -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  copying pyproj/_network.pyi -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  copying pyproj/_sync.pyi -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  copying pyproj/_transformer.pyi -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  copying pyproj/py.typed -> build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj
  running build_ext
  building 'pyproj._geod' extension
  creating build/temp.cygwin-3.3.5-x86_64-cpython-39
  creating build/temp.cygwin-3.3.5-x86_64-cpython-39/pyproj
  gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/include -I/usr/include/python3.9 -c pyproj/_geod.c -o build/temp.cygwin-3.3.5-x86_64-cpython-39/pyproj/_geod.o
  gcc -shared -Wl,--enable-auto-image-base build/temp.cygwin-3.3.5-x86_64-cpython-39/pyproj/_geod.o -L/usr/lib -L/usr/lib/python3.9/config -L/usr/lib -Wl,--enable-new-dtags,-R/usr/lib -lproj -lpython3.9 -o build/lib.cygwin-3.3.5-x86_64-cpython-39/pyproj/_geod.cpython-39-x86_64-cygwin.dll
  /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: unrecognized option '--enable-new-dtags'
  /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: use the --help option for usage information
  collect2: error: ld returned 1 exit status
  error: command '/usr/bin/gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for pyproj
Failed to build pyproj
ERROR: Could not build wheels for pyproj, which is required to install pyproject.toml-based projects

The issue appears to be that --enable-new-dtags is being selected despite this not applying to the Cygwin environment.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
DWeslcommented, Aug 20, 2022

#1120 should be similar to what Joshua-IRT got working

1reaction
DWeslcommented, Aug 16, 2022

Try changing line 170 of setup.py to also test for sys.platform != "cygwin", does that solve your problem?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing new versions of Python on Cygwin does not install ...
Unfortunately, Cygwin currently fails to: Provide pip , pip2 , or pip3 packages. Install the pip and pip2 commands when the python package ......
Read more >
how do i install pip in cygwin? [closed] - Super User
Run the CYGWIN installation program again. Select the pip package you want. Currently, python3-pip and python2-pip are available. Running this ...
Read more >
pip install fails on Cygwin · Issue #14871 · numpy ... - GitHub
Trying to install this on Cygwin on WIn8.1 with Python3.8, we get the following issues. # pip install numpy Collecting numpy Downloading ...
Read more >
Installing and Updating Cygwin Packages
Run setup again in "Install from local directory" mode, with the same "Local package directory", and set of packages selected. Q: How can...
Read more >
Installing python packages failed in Cygwin - CDO
I am using Cygwin in win10 and I want to run the CDO in Python using Cygwin. I installed the python 3.6 in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found