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

Issues while installing using pip #80

Open
walidamrouche opened this issue Oct 7, 2022 · 13 comments
Open

Issues while installing using pip #80

walidamrouche opened this issue Oct 7, 2022 · 13 comments

Comments

@walidamrouche
Copy link

walidamrouche commented Oct 7, 2022

Hi I'm a beginner and I'm facing difficulties to setup this.

I tried to install it using pip, as explained. When I run the code bellow,

pip install lama-cleaner

/# Models will be downloaded at first time used
lama-cleaner --model=lama --device=cpu --port=8080
/# Lama Cleaner is now running at http://localhost:8080

The pip installation goes well then this error message shows up (when trying to run the second line) :

lama-cleaner : The term 'lama-cleaner' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.

Thanks for your help

@yojhanG98
Copy link

hello, were you able to solve it?, I am a beginner, the same thing happened to me

@Sanster
Copy link
Owner

Sanster commented Oct 8, 2022

Hi, I can't reproduce the problem

  • What is your python version and pip version?
  • What operating system is used?

@popdog0
Copy link

popdog0 commented Oct 9, 2022

Could not find a version that satisfies the requirement lama-cleaner (from versions: )
No matching distribution found for lama-cleaner

@Sanster
Copy link
Owner

Sanster commented Oct 9, 2022

Could not find a version that satisfies the requirement lama-cleaner (from versions: ) No matching distribution found for lama-cleaner

What is your version of python? python version should >= 3.6

@popdog0
Copy link

popdog0 commented Oct 9, 2022

Could not find a version that satisfies the requirement lama-cleaner (from versions: ) No matching distribution found for lama-cleaner

What is your version of python? python version should >= 3.6

install,success, thanks.
but,run:lama-cleaner --model=lama --device=cpu --port=8080
lama-cleaner:can't found command

Follow the steps below to solve the problem

1.sudo vim /etc/profile
//append the line on end of file
export PATH=$PATH:~/.local/bin
2. than save and close vim
3.run:source /etc/profile

@walidamrouche
Copy link
Author

Hi, I can't reproduce the problem

* What is your python version and pip version?

pip version : 22.2.1
python version : 3.10.5

* What operating system is used?

I'm on Windows 10 Pro 21H2

@Sanster
Copy link
Owner

Sanster commented Nov 7, 2022

In some environments, the python binary directory may not exist in the shell's PATH. Check Python Installing Packages Guides to see how to add the binary directory to the shell's PATH

@Sanster Sanster pinned this issue Nov 7, 2022
@yingdi11
Copy link

/home/paperspace/.local/bin/lama-cleaner:8 in │
│ │
│ 5 from lama_cleaner import entry_point │
│ 6 if name == 'main': │
│ 7 │ sys.argv[0] = re.sub(r'(-script.pyw|.exe)?$', '', sys.argv[0]) │
│ ❱ 8 │ sys.exit(entry_point()) │
│ 9 │
│ │
│ /home/paperspace/.local/lib/python3.9/site-packages/lama_cleaner/init.py:11 in entry_point │
│ │
│ 8 │ # To make os.environ["XDG_CACHE_HOME"] = args.model_cache_dir works for diffusers │
│ 9 │ # https://github.com/huggingface/diffusers/blob/be99201a567c1ccd841dc16fb24e88f7f239
│ 10 │ from lama_cleaner.server import main │
│ ❱ 11 │ main(args) │
│ 12 │
│ │
│ /home/paperspace/.local/lib/python3.9/site-packages/lama_cleaner/server.py:416 in main │
│ │
│ 413 │ │ ) │
│ 414 │ │ ui.run() │
│ 415 │ else: │
│ ❱ 416 │ │ app.run(host=args.host, port=args.port, debug=args.debug) │
│ 417 │
│ │
│ /home/paperspace/.local/lib/python3.9/site-packages/flask/app.py:990 in run │
│ │
│ 987 │ │ from werkzeug.serving import run_simple │
│ 988 │ │ │
│ 989 │ │ try: │
│ ❱ 990 │ │ │ run_simple(host, port, self, **options) │
│ 991 │ │ finally: │
│ 992 │ │ │ # reset the first request information if the development server │
│ 993 │ │ │ # reset normally. This makes it possible to restart the server │
│ │
│ /home/paperspace/.local/lib/python3.9/site-packages/werkzeug/serving.py:1052 in run_simple │
│ │
│ 1049 │ │ │
│ 1050 │ │ run_with_reloader(inner, extra_files, reloader_interval, reloader_type) │
│ 1051 │ else: │
│ ❱ 1052 │ │ inner() │
│ 1053 │
│ 1054 │
│ 1055 def run_with_reloader(*args, **kwargs): │
│ │
│ /home/paperspace/.local/lib/python3.9/site-packages/werkzeug/serving.py:996 in inner │
│ │
│ 993 │ │ │ fd = int(os.environ["WERKZEUG_SERVER_FD"]) │
│ 994 │ │ except (LookupError, ValueError): │
│ 995 │ │ │ fd = None │
│ ❱ 996 │ │ srv = make_server( │
│ 997 │ │ │ hostname, │
│ 998 │ │ │ port, │
│ 999 │ │ │ application, │
│ │
│ /home/paperspace/.local/lib/python3.9/site-packages/werkzeug/serving.py:847 in make_server │
│ │
│ 844 │ if threaded and processes > 1: │
│ 845 │ │ raise ValueError("cannot have a multithreaded and multi process server.") │
│ 846 │ elif threaded: │
│ ❱ 847 │ │ return ThreadedWSGIServer( │
│ 848 │ │ │ host, port, app, request_handler, passthrough_errors, ssl_context, fd=fd │
│ 849 │ │ ) │
│ 850 │ elif processes > 1: │
│ │
│ /home/paperspace/.local/lib/python3.9/site-packages/werkzeug/serving.py:740 in init
│ │
│ 737 │ │ # remove socket file if it already exists │
│ 738 │ │ if self.address_family == af_unix and os.path.exists(server_address): │
│ 739 │ │ │ os.unlink(server_address) │
│ ❱ 740 │ │ HTTPServer.init(self, server_address, handler) │
│ 741 │ │ │
│ 742 │ │ self.app = app │
│ 743 │ │ self.passthrough_errors = passthrough_errors │
│ │
│ /usr/lib/python3.9/socketserver.py:452 in init
│ │
│ 449 │ │ │ │ │ │ │ │ │ self.socket_type) │
│ 450 │ │ if bind_and_activate: │
│ 451 │ │ │ try: │
│ ❱ 452 │ │ │ │ self.server_bind() │
│ 453 │ │ │ │ self.server_activate() │
│ 454 │ │ │ except: │
│ 455 │ │ │ │ self.server_close() │
│ │
│ /usr/lib/python3.9/http/server.py:137 in server_bind │
│ │
│ 134 │ │
│ 135 │ def server_bind(self): │
│ 136 │ │ """Override server_bind to store the server name.""" │
│ ❱ 137 │ │ socketserver.TCPServer.server_bind(self) │
│ 138 │ │ host, port = self.server_address[:2] │
│ 139 │ │ self.server_name = socket.getfqdn(host) │
│ 140 │ │ self.server_port = port │
│ │
│ /usr/lib/python3.9/socketserver.py:466 in server_bind │
│ │
│ 463 │ │ """ │
│ 464 │ │ if self.allow_reuse_address: │
│ 465 │ │ │ self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) │
│ ❱ 466 │ │ self.socket.bind(self.server_address) │
│ 467 │ │ self.server_address = self.socket.getsockname() │
│ 468 │ │
│ 469 │ def server_activate(self): │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
PermissionError: [Errno 13] Permission denied

@Sikafanka
Copy link

--gui

@qingyangmuchen
Copy link

Hi I'm a beginner and I'm facing difficulties to setup this.
I tried to install it using pip.
The pip installation goes well then this error message shows up(Finally, when lama-cleaner --model=lama --device=cpu --port=8080)
Failed to load model C:\Users\qingyang.cache\torch\hub\checkpoints\big-lama.pt,please submit an issue at https://github.com/Sanster/lama-cleaner/issues and include a screenshot of the error:
open file failed because of errno 2 on fopen: No such file or directory, file path: C:\Users\qingyang.cache\torch\hub\checkpoints\big-lama.pt
(My big-lama.pt is already installed in this location)
How to solve this problem?

@Sanster
Copy link
Owner

Sanster commented Jun 9, 2023

Hi I'm a beginner and I'm facing difficulties to setup this. I tried to install it using pip. The pip installation goes well then this error message shows up(Finally, when lama-cleaner --model=lama --device=cpu --port=8080) Failed to load model C:\Users\qingyang.cache\torch\hub\checkpoints\big-lama.pt,please submit an issue at https://github.com/Sanster/lama-cleaner/issues and include a screenshot of the error: open file failed because of errno 2 on fopen: No such file or directory, file path: C:\Users\qingyang.cache\torch\hub\checkpoints\big-lama.pt (My big-lama.pt is already installed in this location) How to solve this problem?

It may be a permission problem, you can try change the model save directory use --model-dir= when start the server

@qingyangmuchen
Copy link

--model-dir=
How to use this?

@Sanster
Copy link
Owner

Sanster commented Jun 10, 2023

Add --model-dir when you start lama-cleaner:

 lama-cleaner --model=lama --device=cpu --port=8080 --model-dir=D:\models

The D:\models in the example is just an illustration. You can modify it according to your own needs.

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

7 participants