Trying to pip install pinecone-cli but getting this error :(

Hi,

I want to pip install pinecone-cli but I’m getting the error below, does anyone know why? Cheers


Collecting pinecone-cli
Using cached pinecone-cli-1.0.tar.gz (24 kB)
Installing build dependencies … done
Getting requirements to build wheel … error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [24 lines of output]
Traceback (most recent call last):
File “C:\Users\lee__\PycharmProjects\PineconeInfiniteMemoryChatbot\venv\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py”, line 353, in
main()
File “C:\Users\lee__\PycharmProjects\PineconeInfiniteMemoryChatbot\venv\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py”, line 335, in main
json_out[‘return_val’] = hook(**hook_input[‘kwargs’])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\lee__\PycharmProjects\PineconeInfiniteMemoryChatbot\venv\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py”, line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\lee__\AppData\Local\Temp\pip-build-env-93e760r1\overlay\Lib\site-packages\setuptools\build_meta.py”, line 341, in get_requires_for_build_wheel
return self.get_build_requires(config_settings, requirements=[‘wheel’])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lee
_\AppData\Local\Temp\pip-build-env-93e760r1\overlay\Lib\site-packages\setuptools\build_meta.py", line 323, in get_build_requires
self.run_setup()
File "C:\Users\lee
_\AppData\Local\Temp\pip-build-env-93e760r1\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup
exec(code, locals())
File “”, line 14, in
File “C:\Users\lee__\AppData\Local\Programs\Python\Python311\Lib\pathlib.py”, line 1059, in read_text
return f.read()
^^^^^^^^
File “C:\Users\lee__\AppData\Local\Programs\Python\Python311\Lib\encodings\cp1252.py”, line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: ‘charmap’ codec can’t decode byte 0x8f in position 6621: character maps to
[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.

Hey Lee!

Sorry to hear you are running into this error message, I hope I can provide some insight below.

What’s going on?

The error message you’re seeing is a UnicodeDecodeError. This particular error occurs when Python encounters byte sequences that it cannot decode into a character given the specified encoding. In this case, the error message UnicodeDecodeError: ‘charmap’ codec can’t decode byte 0x8f in position 6621: character maps to indicates that the charmap codec is unable to decode a particular byte (0x8f) at a specified position (6621) in the input data.

Cause of the Error:

This error is occurring during the process of gathering requirements to build a wheel for pinecone-cli. Specifically, it’s happening while Python is reading a file during the setup process.

How to Fix the Error:

Here are some ways to troubleshoot and possibly fix this error:

a. Update pip, setuptools, and wheel:

  • Ensure that pip, setuptools, and wheel are updated to their latest versions as sometimes such errors are fixed in newer versions of these libraries. bash pip install --upgrade pip setuptools wheel

b. Manually Download and Install:

  • As an alternative, you might want to manually download the pinecone-cli package, possibly modify the setup files to specify the correct encoding, and then install it locally using pip. bash pip install /path/to/downloaded/pinecone-cli

c. Change Encoding:

  • You might want to specify a different encoding that can handle the byte sequences in the file. A common encoding for this is utf-8. If the error is occurring within your own code, you could specify the encoding when reading the file: python file_path.read_text(encoding='utf-8')

I hope this helps and the install is all okay! Best of luck! :slight_smile: