Skip to content

Instantly share code, notes, and snippets.

@l1x
Last active October 28, 2021 11:09
Show Gist options
  • Save l1x/6897ac3c4daa175f9689eb895a173ff0 to your computer and use it in GitHub Desktop.
Save l1x/6897ac3c4daa175f9689eb895a173ff0 to your computer and use it in GitHub Desktop.
(venv) ➜  mano.local bi-data git:(main)
> pip install polars
Collecting polars
  Downloading polars-0.10.10.tar.gz (543 kB)
     |████████████████████████████████| 543 kB 2.0 MB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing wheel metadata (pyproject.toml) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/l1x/venv/bin/python3 /Users/l1x/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /var/folders/b2/gm3cw9856h3d0jsm36_fldr40000gn/T/tmpzu090_cn
       cwd: /private/var/folders/b2/gm3cw9856h3d0jsm36_fldr40000gn/T/pip-install-cg37r2a_/polars_1fdb52f74b964ebf91f120c18eb1079c
  Complete output (6 lines):

  Cargo, the Rust package manager, is not installed or is not on PATH.
  This package requires Rust and Cargo to compile extensions. Install it through
  the system's package manager or via https://rustup.rs/

  Checking for Rust toolchain....
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/1c/3b/320d0aaeb08ee8cdf77ee7e93c80d14b0c606872782062da6ffba8bdbeb7/polars-0.10.10.tar.gz#sha256=ad3e2eb9e6212609fa5a5b8d7a6a9983d014f378c4495711cab6ca4c21f820d5 (from https://pypi.org/simple/polars/). Command errored out with exit status 1: /Users/l1x/venv/bin/python3 /Users/l1x/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /var/folders/b2/gm3cw9856h3d0jsm36_fldr40000gn/T/tmpzu090_cn Check the logs for full command output.
  Downloading polars-0.10.9-cp36-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (17.6 MB)
     |████████████████████████████████| 17.6 MB 18.9 MB/s
Requirement already satisfied: numpy in /Users/l1x/venv/lib/python3.9/site-packages (from polars) (1.21.2)
Installing collected packages: polars
Successfully installed polars-0.10.9
>>> df = pl.read_csv("https://j.mp/iriscsv")
Traceback (most recent call last):
  File "/Users/l1x/venv/lib/python3.9/site-packages/fsspec/registry.py", line 211, in get_filesystem_class
    register_implementation(protocol, _import_class(bit["class"]))
  File "/Users/l1x/venv/lib/python3.9/site-packages/fsspec/registry.py", line 234, in _import_class
    mod = importlib.import_module(mod)
  File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Users/l1x/venv/lib/python3.9/site-packages/fsspec/implementations/http.py", line 10, in <module>
    import aiohttp
ModuleNotFoundError: No module named 'aiohttp'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/l1x/venv/lib/python3.9/site-packages/polars/io.py", line 368, in read_csv
    with _prepare_file_arg(file, **storage_options) as data:
  File "/Users/l1x/venv/lib/python3.9/site-packages/polars/io.py", line 125, in _prepare_file_arg
    return fsspec.open(file, **kwargs)
  File "/Users/l1x/venv/lib/python3.9/site-packages/fsspec/core.py", line 429, in open
    return open_files(
  File "/Users/l1x/venv/lib/python3.9/site-packages/fsspec/core.py", line 281, in open_files
    fs, fs_token, paths = get_fs_token_paths(
  File "/Users/l1x/venv/lib/python3.9/site-packages/fsspec/core.py", line 599, in get_fs_token_paths
    cls = get_filesystem_class(protocol)
  File "/Users/l1x/venv/lib/python3.9/site-packages/fsspec/registry.py", line 213, in get_filesystem_class
    raise ImportError(bit["err"]) from e
ImportError: HTTPFileSystem requires "requests" and "aiohttp" to be installed
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment