Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

[Bug] <Pip installer has its own ideas of where to install Canopy> #240

Closed
2 tasks done
gaoptimize opened this issue Jan 2, 2024 · 1 comment
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@gaoptimize
Copy link

gaoptimize commented Jan 2, 2024

Is this a new bug?

  • I believe this is a new bug
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

I am new to Python and its virtual environments, however, the Pip installer is ignoring my istructions on where to install canopy-env because it claims it is unwritable (it is writable) and defaults to an "AppData\Roaming" folder I want nothing to with (having to do with my OneDrive distrust). My System Path points to "C:\Program Files\Python312", "C:\Program Files\Python312\Lib", and "C:\Program Files\Python312\Scripts" and my user Path doesn't have a folder specified for Python.

Expected Behavior

Install Canopy in the folder I told it to.

Steps To Reproduce

Issue the following command:

PS C:\Users\ [username] \Documents\canopy-env> py -m pip install canopy-sdk

Relevant log output

The following error will occur (note I am an administrator on this computer and "Trusted Installers" have also been given full permissions to the "C:\Users\[username]\Documents" and "C:\Program Files\Python312\" folders:
==============================================
Defaulting to user installation because normal site-packages is not writeable

Collecting canopy-sdk
  Using cached canopy_sdk-0.5.0-py3-none-any.whl.metadata (15 kB)
Collecting fastapi<0.93.0,>=0.92.0 (from canopy-sdk)
  Using cached fastapi-0.92.0-py3-none-any.whl (56 kB)
Collecting gunicorn<22.0.0,>=21.2.0 (from canopy-sdk)
  Using cached gunicorn-21.2.0-py3-none-any.whl.metadata (4.1 kB)
Collecting jsonschema<5.0.0,>=4.2.0 (from canopy-sdk)
  Using cached jsonschema-4.20.0-py3-none-any.whl.metadata (8.1 kB)
Collecting openai<2.0.0,>=1.2.3 (from canopy-sdk)
  Using cached openai-1.6.1-py3-none-any.whl.metadata (17 kB)
Collecting pandas-stubs<3.0.0.0,>=2.0.3.230814 (from canopy-sdk)
  Using cached pandas_stubs-2.1.4.231227-py3-none-any.whl.metadata (9.6 kB)
Collecting pinecone-client<3.0.0,>=2.2.2 (from canopy-sdk)
  Using cached pinecone_client-2.2.4-py3-none-any.whl.metadata (7.8 kB)
Collecting pinecone-datasets<0.7.0,>=0.6.2 (from canopy-sdk)
  Using cached pinecone_datasets-0.6.2-py3-none-any.whl.metadata (11 kB)
Collecting pinecone-text<0.8.0,>=0.7.1 (from canopy-sdk)
  Using cached pinecone_text-0.7.1-py3-none-any.whl.metadata (9.0 kB)
Collecting prompt-toolkit<4.0.0,>=3.0.39 (from canopy-sdk)
  Using cached prompt_toolkit-3.0.43-py3-none-any.whl.metadata (6.5 kB)
Collecting pydantic<2.0.0,>=1.10.7 (from canopy-sdk)
  Using cached pydantic-1.10.13-py3-none-any.whl.metadata (149 kB)
Collecting python-dotenv<2.0.0,>=1.0.0 (from canopy-sdk)
  Using cached python_dotenv-1.0.0-py3-none-any.whl (19 kB)
Collecting sentencepiece<0.2.0,>=0.1.99 (from canopy-sdk)
  Using cached sentencepiece-0.1.99.tar.gz (2.6 MB)
  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
  ╰─> [31 lines of output]
      Traceback (most recent call last):
        File "C:\Users\gaopt\AppData\Roaming\Python\Python312\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\gaopt\AppData\Roaming\Python\Python312\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\gaopt\AppData\Roaming\Python\Python312\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\gaopt\AppData\Local\Temp\pip-build-env-v_l6vtru\overlay\Lib\site-packages\setuptools\build_meta.py", 
line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\gaopt\AppData\Local\Temp\pip-build-env-v_l6vtru\overlay\Lib\site-packages\setuptools\build_meta.py", 
line 295, in _get_build_requires
          self.run_setup()
        File "C:\Users\gaopt\AppData\Local\Temp\pip-build-env-v_l6vtru\overlay\Lib\site-packages\setuptools\build_meta.py", 
line 480, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "C:\Users\gaopt\AppData\Local\Temp\pip-build-env-v_l6vtru\overlay\Lib\site-packages\setuptools\build_meta.py", 
line 311, in run_setup
          exec(code, locals())
        File "<string>", line 126, in <module>
        File "C:\Program Files\Python312\Lib\subprocess.py", line 408, in check_call
          retcode = call(*popenargs, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Program Files\Python312\Lib\subprocess.py", line 389, in call
          with Popen(*popenargs, **kwargs) as p:
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Program Files\Python312\Lib\subprocess.py", line 1026, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "C:\Program Files\Python312\Lib\subprocess.py", line 1538, in _execute_child
          hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      FileNotFoundError: [WinError 2] The system cannot find the file specified
      [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.

Environment

- **Windows 10**:
- **Python312**:
- **canopy_sdk-0.5.0-py3-none-any.whl.metadata**:

Additional Context

No response

@gaoptimize gaoptimize added the bug Something isn't working label Jan 2, 2024
@izellevy
Copy link
Collaborator

izellevy commented Jan 4, 2024

Hi @gaoptimize, it looks like the installation fails because one of the dependencies of canopy (sentencepiece) has no support for Python 3.12 (google/sentencepiece#932). Please note that we do not officially support Python 3.12 as stated here: #201. So as of now I recommend using Python version <=3.11.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants