Skip to content

Installing Queueing_Tool in PyPy environment #108

@galenseilis

Description

@galenseilis

I recall from this issue that at one point I had successfully installed queueing_tool for pypy3. But now I seem to be getting the following error:

$ pypy3 -m pip install queueing_tool
Defaulting to user installation because normal site-packages is not writeable
Collecting queueing_tool
  Using cached queueing-tool-1.2.5.tar.gz (1.1 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
  WARNING: Generating metadata for package queueing_tool produced metadata for project name unknown. Fix your #egg=queueing_tool fragments.
Discarding https://files.pythonhosted.org/packages/6f/4b/e4dfa2a97e76a7447a360cb2e33b3db4ee68fcb737909d74721d7ddfa44d/queueing-tool-1.2.5.tar.gz#sha256=4804f875a9c159bd8a09fb56affc2f295ed31be11988f5da4047c6541f0f55c5 (from https://pypi.org/simple/queueing-tool/) (requires-python:!=3.0,!=3.1,!=3.2,>=2.7): Requested unknown from https://files.pythonhosted.org/packages/6f/4b/e4dfa2a97e76a7447a360cb2e33b3db4ee68fcb737909d74721d7ddfa44d/queueing-tool-1.2.5.tar.gz#sha256=4804f875a9c159bd8a09fb56affc2f295ed31be11988f5da4047c6541f0f55c5 has inconsistent name: filename has 'queueing-tool', but metadata has 'unknown'
  Using cached queueing-tool-1.2.4.tar.gz (269 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: networkx>=1.9 in /usr/lib/python3/dist-packages (from queueing_tool) (2.4)
Requirement already satisfied: numpy>=1.9 in /home/galen/.local/lib/pypy3.8/site-packages (from queueing_tool) (1.24.4)
Building wheels for collected packages: queueing_tool
  Building wheel for queueing_tool (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [61 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.8
      creating build/lib.linux-x86_64-3.8/queueing_tool
      copying queueing_tool/__init__.py -> build/lib.linux-x86_64-3.8/queueing_tool
      copying queueing_tool/union_find.py -> build/lib.linux-x86_64-3.8/queueing_tool
      creating build/lib.linux-x86_64-3.8/queueing_tool/graph
      copying queueing_tool/graph/graph_functions.py -> build/lib.linux-x86_64-3.8/queueing_tool/graph
      copying queueing_tool/graph/__init__.py -> build/lib.linux-x86_64-3.8/queueing_tool/graph
      copying queueing_tool/graph/graph_generation.py -> build/lib.linux-x86_64-3.8/queueing_tool/graph
      copying queueing_tool/graph/graph_wrapper.py -> build/lib.linux-x86_64-3.8/queueing_tool/graph
      copying queueing_tool/graph/graph_preparation.py -> build/lib.linux-x86_64-3.8/queueing_tool/graph
      creating build/lib.linux-x86_64-3.8/queueing_tool/network
      copying queueing_tool/network/__init__.py -> build/lib.linux-x86_64-3.8/queueing_tool/network
      copying queueing_tool/network/queue_network.py -> build/lib.linux-x86_64-3.8/queueing_tool/network
      creating build/lib.linux-x86_64-3.8/queueing_tool/queues
      copying queueing_tool/queues/queue_servers.py -> build/lib.linux-x86_64-3.8/queueing_tool/queues
      copying queueing_tool/queues/__init__.py -> build/lib.linux-x86_64-3.8/queueing_tool/queues
      copying queueing_tool/queues/agents.py -> build/lib.linux-x86_64-3.8/queueing_tool/queues
      copying queueing_tool/queues/queue_extentions.py -> build/lib.linux-x86_64-3.8/queueing_tool/queues
      running build_ext
      /usr/lib/python3/dist-packages/pythran/tables.py:4520: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
        if not hasattr(numpy, method):
      /usr/lib/python3/dist-packages/pythran/tables.py:4553: FutureWarning: In the future `np.bytes` will be defined as the corresponding NumPy scalar.
        obj = getattr(themodule, elem)
      Compiling queueing_tool/network/priority_queue.pyx because it changed.
      [1/1] Cythonizing queueing_tool/network/priority_queue.pyx
      /home/galen/.local/lib/pypy3.8/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/pip-install-5k0qnxlt/queueing-tool_72a3cfa4c64c42d99d074a27eac54e0b/queueing_tool/network/priority_queue.pyx
        tree = Parsing.p_module(s, pxd, full_module_name)
      performance hint: queueing_tool/network/priority_queue.pyx:131:5: Exception check on '_siftdown' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on the function to allow an error code to be returned.
      performance hint: queueing_tool/network/priority_queue.pyx:156:5: Exception check on '_siftup' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on the function to allow an error code to be returned.
      performance hint: queueing_tool/network/priority_queue.pyx:189:5: Exception check on 'heapify' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on the function to allow an error code to be returned.
      performance hint: queueing_tool/network/priority_queue.pyx:40:28: Index should be typed for more efficient access
      performance hint: queueing_tool/network/priority_queue.pyx:70:28: Exception check will always require the GIL to be acquired.
      Possible solutions:
          1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on the function to allow an error code to be returned.
      performance hint: queueing_tool/network/priority_queue.pyx:119:19: Exception check will always require the GIL to be acquired.
      Possible solutions:
          1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on the function to allow an error code to be returned.
      performance hint: queueing_tool/network/priority_queue.pyx:183:13: Exception check will always require the GIL to be acquired.
      Possible solutions:
          1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on the function to allow an error code to be returned.
      performance hint: queueing_tool/network/priority_queue.pyx:192:15: Exception check will always require the GIL to be acquired.
      Possible solutions:
          1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on the function to allow an error code to be returned.
      error: Command "gcc -pthread -DNDEBUG -O2 -fPIC -I/usr/include/pypy3.8 -c queueing_tool/network/priority_queue.c -o build/temp.linux-x86_64-3.8/queueing_tool/network/priority_queue.o" failed with exit status 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for queueing_tool
  Running setup.py clean for queueing_tool
Failed to build queueing_tool
Installing collected packages: queueing_tool
  Running setup.py install for queueing_tool ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for queueing_tool did not run successfully.
  │ exit code: 1
  ╰─> [30 lines of output]
      running install
      /usr/lib/python3/dist-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        setuptools.SetuptoolsDeprecationWarning,
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.8
      creating build/lib.linux-x86_64-3.8/queueing_tool
      copying queueing_tool/__init__.py -> build/lib.linux-x86_64-3.8/queueing_tool
      copying queueing_tool/union_find.py -> build/lib.linux-x86_64-3.8/queueing_tool
      creating build/lib.linux-x86_64-3.8/queueing_tool/graph
      copying queueing_tool/graph/graph_functions.py -> build/lib.linux-x86_64-3.8/queueing_tool/graph
      copying queueing_tool/graph/__init__.py -> build/lib.linux-x86_64-3.8/queueing_tool/graph
      copying queueing_tool/graph/graph_generation.py -> build/lib.linux-x86_64-3.8/queueing_tool/graph
      copying queueing_tool/graph/graph_wrapper.py -> build/lib.linux-x86_64-3.8/queueing_tool/graph
      copying queueing_tool/graph/graph_preparation.py -> build/lib.linux-x86_64-3.8/queueing_tool/graph
      creating build/lib.linux-x86_64-3.8/queueing_tool/network
      copying queueing_tool/network/__init__.py -> build/lib.linux-x86_64-3.8/queueing_tool/network
      copying queueing_tool/network/queue_network.py -> build/lib.linux-x86_64-3.8/queueing_tool/network
      creating build/lib.linux-x86_64-3.8/queueing_tool/queues
      copying queueing_tool/queues/queue_servers.py -> build/lib.linux-x86_64-3.8/queueing_tool/queues
      copying queueing_tool/queues/__init__.py -> build/lib.linux-x86_64-3.8/queueing_tool/queues
      copying queueing_tool/queues/agents.py -> build/lib.linux-x86_64-3.8/queueing_tool/queues
      copying queueing_tool/queues/queue_extentions.py -> build/lib.linux-x86_64-3.8/queueing_tool/queues
      running build_ext
      /usr/lib/python3/dist-packages/pythran/tables.py:4520: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
        if not hasattr(numpy, method):
      /usr/lib/python3/dist-packages/pythran/tables.py:4553: FutureWarning: In the future `np.bytes` will be defined as the corresponding NumPy scalar.
        obj = getattr(themodule, elem)
      error: Command "gcc -pthread -DNDEBUG -O2 -fPIC -I/usr/include/pypy3.8 -c queueing_tool/network/priority_queue.c -o build/temp.linux-x86_64-3.8/queueing_tool/network/priority_queue.o" failed with exit status 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> queueing_tool

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

I realize there is nothing about queueing_tool's features that promises that it should work with PyPy. But it did give some speed improvement so I would like to better understand how to reproduce that state if possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions