WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: pip ImportError: cannot import name 'PackageFinder'  (Read 669 times)

Offline CapnDangerPants

  • Newbie
  • *
  • Posts: 4
pip ImportError: cannot import name 'PackageFinder'
« on: December 10, 2023, 06:46:44 PM »
Every time I try to run a pip command, I get this error:

Code: [Select]
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 33, in <module>
    sys.exit(load_entry_point('pip==20.3.3', 'console_scripts', 'pip')())
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 487, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2728, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2346, in load
    return self.resolve()
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2352, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/__init__.py", line 40, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/cli/autocompletion.py", line 8, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/cli/main_parser.py", line 12, in <module>
    from pip._internal.commands import (
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/commands/__init__.py", line 6, in <module>
    from pip._internal.commands.completion import CompletionCommand
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/commands/completion.py", line 6, in <module>
    from pip._internal.cli.base_command import Command
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 23, in <module>
    from pip._internal.index import PackageFinder
ImportError: cannot import name 'PackageFinder'

I have python3.6 and python3.6-pip installed. Any ideas on how to fix this?
« Last Edit: December 11, 2023, 12:08:43 AM by Juanito »

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14541
Re: pip ImportError: cannot import name 'PackageFinder'
« Reply #1 on: December 11, 2023, 12:12:33 AM »
What version and architecture of tinycore are you using and what command are you issuing?

For example, the following works for me:
Code: [Select]
sudo pip3 install mako

Offline CapnDangerPants

  • Newbie
  • *
  • Posts: 4
Re: pip ImportError: cannot import name 'PackageFinder'
« Reply #2 on: December 11, 2023, 06:00:54 AM »
I'm using CorePlus.

No pip command has worked for me yet. I've tried pip, pip install, python3.6 -m pip install -U pip and the one that you used as an example, and they've all had the same problem.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11219
Re: pip ImportError: cannot import name 'PackageFinder'
« Reply #3 on: December 11, 2023, 06:43:48 AM »
Hi CapnDangerPants
What version and architecture of tinycore are you using ...
I'm using CorePlus. ...
What do these 2 commands return:
Code: [Select]
uname -r
version

Offline CapnDangerPants

  • Newbie
  • *
  • Posts: 4
Re: pip ImportError: cannot import name 'PackageFinder'
« Reply #4 on: December 11, 2023, 12:30:07 PM »
uname -r returns: 6.1.2-tinycore

version returns: 14.0

Offline CapnDangerPants

  • Newbie
  • *
  • Posts: 4
Re: pip ImportError: cannot import name 'PackageFinder'
« Reply #5 on: December 12, 2023, 06:07:49 AM »
I figured it out. I uninstalled python3.6 and python3.6-pip and used python3.9 instead and pip3 worked.