Coder Social home page Coder Social logo

Comments (9)

aisk avatar aisk commented on July 21, 2024 2

Some one provided me a Google colab access, and after running pip install thriftpy2 -v, the error log is:



Using pip 23.1.2 from /usr/local/lib/python3.10/dist-packages/pip (python 3.10)
Collecting thriftpy2
  Using cached thriftpy2-0.4.16.tar.gz (643 kB)
  Running command python setup.py egg_info
  /usr/local/lib/python3.10/dist-packages/Cython/Compiler/Main.py:384: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/pip-install-smk5791j/thriftpy2_5bfb8ae99c874dad96e90a45ca1df5fa/thriftpy2/transport/cybase.pxd
    tree = Parsing.p_module(s, pxd, full_module_name)

  Error compiling Cython file:
  ------------------------------------------------------------
  ...

      cdef int grow(self, int min_size):
          if min_size <= self.buf_size:
              return 0

          cdef int multiples = min_size / self.buf_size
                                        ^
  ------------------------------------------------------------

  thriftpy2/transport/cybase.pyx:90:38: Cannot assign type 'double' to 'int'
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-install-smk5791j/thriftpy2_5bfb8ae99c874dad96e90a45ca1df5fa/setup.py", line 61, in <module>
      cythonize("thriftpy2/transport/cybase.pyx")
    File "/usr/local/lib/python3.10/dist-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
      cythonize_one(*args)
    File "/usr/local/lib/python3.10/dist-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
      raise CompileError(None, pyx_file)
  Cython.Compiler.Errors.CompileError: thriftpy2/transport/cybase.pyx
  Compiling thriftpy2/transport/cybase.pyx because it changed.
  [1/1] Cythonizing thriftpy2/transport/cybase.pyx
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /usr/bin/python3 -c '
  exec(compile('"'"''"'"''"'"'
  # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
  #
  # - It imports setuptools before invoking setup.py, to enable projects that directly
  #   import from `distutils.core` to work with newer packaging standards.
  # - It provides a clear error message when setuptools is not installed.
  # - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
  #   setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
  #     manifest_maker: standard file '"'"'-c'"'"' not found".
  # - It generates a shim setup.py, for handling setup.cfg-only projects.
  import os, sys, tokenize
  
  try:
      import setuptools
  except ImportError as error:
      print(
          "ERROR: Can not execute `setup.py` since setuptools is not available in "
          "the build environment.",
          file=sys.stderr,
      )
      sys.exit(1)
  
  __file__ = %r
  sys.argv[0] = __file__
  
  if os.path.exists(__file__):
      filename = __file__
      with tokenize.open(__file__) as f:
          setup_py_code = f.read()
  else:
      filename = "<auto-generated setuptools caller>"
      setup_py_code = "from setuptools import setup; setup()"
  
  exec(compile(setup_py_code, filename, "exec"))
  '"'"''"'"''"'"' % ('"'"'/tmp/pip-install-smk5791j/thriftpy2_5bfb8ae99c874dad96e90a45ca1df5fa/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' egg_info --egg-base /tmp/pip-pip-egg-info-vgz1vbgz
  cwd: /tmp/pip-install-smk5791j/thriftpy2_5bfb8ae99c874dad96e90a45ca1df5fa/
  Preparing metadata (setup.py) ... error
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

So I think this is related to #218, which is already fixed in master branch. I think we should make a release cc @ethe

from thriftpy2.

zhilu1 avatar zhilu1 commented on July 21, 2024 1

Unless you provide the actual error log, we cannot provide any help.

That's the error message I got in Google Colab, I don't know where else I can get a log.

For reproduction, enter pip install thriftpy2 on Google colab notebook cell.

图片

from thriftpy2.

aisk avatar aisk commented on July 21, 2024

Unless you provide the actual error log, we cannot provide any help.

from thriftpy2.

aisk avatar aisk commented on July 21, 2024

Sorry, I can't reproduce the issue.

from thriftpy2.

PDXDJN avatar PDXDJN commented on July 21, 2024

I get the same error.
IMG_1310

so, I tried installing all recent thriftpy2 versions directly, and none of them work:
IMG_1309
It was working without issue until about a week ago.

from thriftpy2.

aisk avatar aisk commented on July 21, 2024

What's the pip / setuptools / python version?

from thriftpy2.

PDXDJN avatar PDXDJN commented on July 21, 2024

python 3.10.12
pip 23.1.2
setuptools 67.7.2

from thriftpy2.

aisk avatar aisk commented on July 21, 2024

Tried the pip / setuptools with provides versions combination, still can't reproduce the issue. I don't have a access for the colab, if some one knows the different between it and a linux environment, please point out.

from thriftpy2.

aisk avatar aisk commented on July 21, 2024

This should be resolved since v0.14.7 was published.

from thriftpy2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.