Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pip uninstall not removing the package #74

Open
stduhpf opened this issue May 3, 2023 · 2 comments
Open

Pip uninstall not removing the package #74

stduhpf opened this issue May 3, 2023 · 2 comments

Comments

@stduhpf
Copy link
Contributor

stduhpf commented May 3, 2023

$: python examples/python/example-alpaca.py
Traceback (most recent call last):
  File "examples/python/example-alpaca.py", line 1, in <module>
    from fastllama import Model
ImportError: cannot import name 'Model' from 'fastllama' (unknown location)
$: pip install git+https://github.com/PotatoSpudowski/fastLLaMa.git@main
[...]
$: pip list |grep fastllama|wc -l
1
$: python examples/python/example-alpaca.py
[works as expected]
$: pip uninstall fastllama -y
Found existing installation: fastllama 1.0.0
Uninstalling fastllama-1.0.0:
  Successfully uninstalled fastllama-1.0.0
$: pip list |grep fastllama|wc -l
0
$: python examples/python/example-alpaca.py
[still works????]

Im not sure what might be the cause of this issue... The only way I found to remove is to delete it directly from the site-packages folder.

@stduhpf
Copy link
Contributor Author

stduhpf commented May 3, 2023

Here is the script I use to completly rebuild the project, (It's somehow related to this issue, so I'll leave it there)

#!/bin/bash

# full uninstall
pip uninstall fastllama -y
python setup.py develop -u
libpath="$(dirname $(dirname $(which pip)))/lib"
rm -r $libpath/$(ls $libpath | grep ^python)/site-packages/fastllama/

# build either current branch, or branch given as cli arg
if [ -z "$1" ]
  then
    branch=$(git rev-parse --abbrev-ref HEAD)
    else
    branch=$1
fi

pip install git+file://$PWD@$branch

@PotatoSpudowski
Copy link
Owner

Interesting, I will think about ways to do this meanwhile for now as you mentioned the only proper way is to remove it from site packages directly.

Let's keep this issue open for now and I will pick it up when I get some bandwidth from other tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants