questdb / py-questdb-client

Python client for QuestDB InfluxDB Line Protocol
https://py-questdb-client.readthedocs.io
Apache License 2.0
55 stars 10 forks source link

No module named 'install_rust' with 1.0.1 #25

Closed fabianbaier closed 2 years ago

fabianbaier commented 2 years ago

Hi,

When trying to install the client via poetry add questdb I end up with the error

 ModuleNotFoundError: No module named 'install_rust'

I am using

# poetry --version
Poetry (version 1.2.2)
# python --version
Python 3.11.0
# pip --version
pip 22.3 from /usr/local/lib/python3.11/site-packages/pip (python 3.11)

When looking at the wheel, it seems like it is just missing in the release:

(after tar xzfv questdb-1.0.1.tar.gz)

root@3e922048426b:/tmp/questdb-1.0.1# ls -al
total 60
drwxr-xr-x  5  501 staff  4096 Aug 16 20:53 .
drwxrwxrwt  1 root root   4096 Oct 30 23:13 ..
-rw-r--r--  1  501 staff 11357 Jul 14 10:54 LICENSE.txt
-rw-r--r--  1  501 staff   267 Jul 14 10:54 MANIFEST.in
-rw-r--r--  1  501 staff   177 Aug 16 20:53 PKG-INFO
-rw-r--r--  1  501 staff  1513 Aug 16 20:44 README.rst
drwxr-xr-x 13  501 staff  4096 Aug 16 20:53 c-questdb-client
-rw-r--r--  1  501 staff  2201 Aug 16 20:44 pyproject.toml
-rw-r--r--  1  501 staff    38 Aug 16 20:53 setup.cfg
-rwxr-xr-x  1  501 staff  4284 Aug 16 20:44 setup.py
drwxr-xr-x  4  501 staff  4096 Aug 16 20:53 src
drwxr-xr-x  2  501 staff  4096 Aug 16 20:53 test

Verbose log:

p# poetry add questdb
Skipping virtualenv creation, as specified in config file.
Using version ^1.0.1 for questdb

Updating dependencies
Resolving dependencies... (0.3s)

Writing lock file

Package operations: 1 install, 0 updates, 0 removals

  • Installing questdb (1.0.1): Failed

  CalledProcessError

  Command '['/usr/local/bin/python3.11', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--prefix', '/usr/local', '--no-deps', '/root/.cache/pypoetry/artifacts/4d/de/02/2f89912d9c708ff1810665dfac7ce69c885d4f1b64558ebbb5c91a1723/questdb-1.0.1.tar.gz']' returned non-zero exit status 1.

  at /usr/local/lib/python3.11/subprocess.py:569 in run
       565│             # We don't call process.wait() as .__exit__ does that for us.
       566│             raise
       567│         retcode = process.poll()
       568│         if check and retcode:
    →  569│             raise CalledProcessError(retcode, process.args,
       570│                                      output=stdout, stderr=stderr)
       571│     return CompletedProcess(process.args, retcode, stdout, stderr)
       572│ 
       573│ 

The following error occurred when trying to handle this error:

  EnvCommandError

  Command ['/usr/local/bin/python3.11', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--prefix', '/usr/local', '--no-deps', '/root/.cache/pypoetry/artifacts/4d/de/02/2f89912d9c708ff1810665dfac7ce69c885d4f1b64558ebbb5c91a1723/questdb-1.0.1.tar.gz'] errored with the following return code 1, and output: 
  Processing /root/.cache/pypoetry/artifacts/4d/de/02/2f89912d9c708ff1810665dfac7ce69c885d4f1b64558ebbb5c91a1723/questdb-1.0.1.tar.gz
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'error'
    error: subprocess-exited-with-error

    × Getting requirements to build wheel did not run successfully.
    │ exit code: 1
    ╰─> [21 lines of output]
        Traceback (most recent call last):
          File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
            main()
          File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
            json_out['return_val'] = hook(**hook_input['kwargs'])
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 118, in get_requires_for_build_wheel
            return hook(config_settings)
                   ^^^^^^^^^^^^^^^^^^^^^
          File "/tmp/pip-build-env-8rmhyd0c/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel
            return self._get_build_requires(config_settings, requirements=['wheel'])
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/tmp/pip-build-env-8rmhyd0c/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
            self.run_setup()
          File "/tmp/pip-build-env-8rmhyd0c/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 484, in run_setup
            self).run_setup(setup_script=setup_script)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/tmp/pip-build-env-8rmhyd0c/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 335, in run_setup
            exec(code, locals())
          File "<string>", line 15, in <module>
        ModuleNotFoundError: No module named 'install_rust'
        [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
  error: subprocess-exited-with-error

  × Getting requirements to build wheel 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.
amunra commented 2 years ago

Hi @fabianbaier,

There's no binaries for 3.11 quite yet. What's happening in your case is that since the binary is missing it's trying to build from source and I've missed out on adding that file to the tarball.

Support for 3.11 will be shipped very soon as part of the next patch release.