kalliope-project / kalliope

Kalliope is a framework that will help you to create your own personal assistant.
https://kalliope-project.github.io/
GNU General Public License v3.0
1.71k stars 229 forks source link

No module named 'pip' #691

Closed cprn closed 7 months ago

cprn commented 7 months ago

Hi, I'm not fluent in Python. I'm on Manjaro (Arch). I tried to use AUR package but it's out of date. Then I tried to install in virtual environment directly from here but got the error - any chance it's something on your end?:

❯ python --version
Python 3.11.6
❯ pip --version
pip 23.3.1 from /usr/lib/python3.11/site-packages/pip (python 3.11)
❯ git clone https://github.com/kalliope-project/kalliope
Cloning into 'kalliope'...
[...]
Resolving deltas: 100% (7730/7730), done.
❯ cd kalliope
❯ python -m venv .venv
❯ source .venv/bin/activate
❯ python --version
Python 3.11.6
❯ pip --version
pip 23.3.1 from /home/user/Projects/kalliope/.venv/lib/python3.11/site-packages/pip (python 3.11)
❯ pip install .
Processing /home/user/Projects/kalliope
  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
  ╰─> [20 lines of output]
      Traceback (most recent call last):
        File "/home/user/Projects/kalliope/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/user/Projects/kalliope/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/user/Projects/kalliope/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-rrcqm9hl/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-rrcqm9hl/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-rrcqm9hl/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 480, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-rrcqm9hl/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 6, in <module>
      ModuleNotFoundError: No module named 'pip'
      [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.

I don't understand why it's happening because I have pip and it's up to date:

❯ python -m ensurepip --default-pip
Looking in links: /tmp/tmployrybsr
Requirement already satisfied: setuptools in ./.venv/lib/python3.11/site-packages (65.5.0)
Requirement already satisfied: pip in ./.venv/lib/python3.11/site-packages (23.3.1)

I cannot install manually outside of virtual environment because:

❯ deactivate
❯ python -m ensurepip --default-pip
error: externally-managed-environment
cprn commented 7 months ago

Nevermind, I missed the Getting requirements to build wheel ... error line. Installing it manually fixed it:

pip install wheel