Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 673
    • Issues 673
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyPy
  • pypypypy
  • Issues
  • #3493
Closed
Open
Created Jun 17, 2021 by Michaelsky0913@Michaelsky0913

pyodbc could not be installed when use pypy3

Error msg:

ERROR: Command errored out with exit status 1:

   command: /opt/venv4test/bin/pypy3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-ubskpjkx/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-ubskpjkx/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-lj6mataa

       cwd: /tmp/pip-req-build-ubskpjkx/

  Complete output (37 lines):

  /opt/venv4test/site-packages/setuptools/dist.py:694: UserWarning: Usage of dash-separated 'index-url' will not be supported in future versions. Please use the underscore name 'index_url' instead
    % (opt, underscore_opt))

  running bdist_wheel

  running build

  running build_ext

  building 'pyodbc' extension

  creating build

  creating build/temp.linux-x86_64-3.7

  creating build/temp.linux-x86_64-3.7/src

  gcc -pthread -DNDEBUG -O2 -fPIC -DPYODBC_VERSION=4.0.31b52 -I/opt/venv4test/include -I/opt/pypy3/include -c src/buffer.cpp -o build/temp.linux-x86_64-3.7/src/buffer.o -Wno-write-strings

  gcc -pthread -DNDEBUG -O2 -fPIC -DPYODBC_VERSION=4.0.31b52 -I/opt/venv4test/include -I/opt/pypy3/include -c src/cnxninfo.cpp -o build/temp.linux-x86_64-3.7/src/cnxninfo.o -Wno-write-strings

  gcc -pthread -DNDEBUG -O2 -fPIC -DPYODBC_VERSION=4.0.31b52 -I/opt/venv4test/include -I/opt/pypy3/include -c src/connection.cpp -o build/temp.linux-x86_64-3.7/src/connection.o -Wno-write-strings

  src/connection.cpp: In function ‘bool ApplyPreconnAttrs(HDBC, SQLINTEGER, PyObject*, char*)’:

  src/connection.cpp:194:24: error: ‘PyCodec_Encode’ was not declared in this scope

           stringholder = PyCodec_Encode(value, strencoding ? strencoding : "utf-16le", "strict");
                          ^~~~~~~~~~~~~~

  src/connection.cpp:194:24: note: suggested alternative: ‘PyCodec_Encoder’

           stringholder = PyCodec_Encode(value, strencoding ? strencoding : "utf-16le", "strict");
                          ^~~~~~~~~~~~~~
                          PyCodec_Encoder

  src/connection.cpp: In function ‘PyObject* Connection_New(PyObject*, bool, bool, long int, bool, PyObject*, Object&)’:

  src/connection.cpp:266:76: error: ‘PyCodec_Encode’ was not declared in this scope
               (PyUnicode_Check(encoding) ? PyBytes_AsString(encodingholder = PyCodec_Encode(encoding, "utf-8", "strict")) :
                                                                              ^~~~~~~~~~~~~~

  src/connection.cpp:266:76: note: suggested alternative: ‘PyCodec_Encoder’

               (PyUnicode_Check(encoding) ? PyBytes_AsString(encodingholder = PyCodec_Encode(encoding, "utf-8", "strict")) :

                                                                              ^~~~~~~~~~~~~~
                                                                              PyCodec_Encoder

  src/connection.cpp: In function ‘bool SetTextEncCommon(TextEnc&, const char*, int, bool)’:

  src/connection.cpp:1371:10: error: ‘PyCodec_KnownEncoding’ was not declared in this scope

       if (!PyCodec_KnownEncoding(encoding))

            ^~~~~~~~~~~~~~~~~~~~~
  src/connection.cpp:1371:10: note: suggested alternative: ‘PyCodec_Encoder’

       if (!PyCodec_KnownEncoding(encoding))
            ^~~~~~~~~~~~~~~~~~~~~

            PyCodec_Encoder
  error: command 'gcc' failed with exit status 1
  ----------------------------------------

  ERROR: Failed building wheel for pyodbc
Edited Jun 17, 2021 by Matti Picus
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking