IOPaint icon indicating copy to clipboard operation
IOPaint copied to clipboard

Issues while installing using pip

Open walidamrouche opened this issue 3 years ago • 13 comments

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

walidamrouche avatar Oct 07 '22 19:10 walidamrouche

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

yojhanG98 avatar Oct 08 '22 12:10 yojhanG98

Hi, I can't reproduce the problem

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

Sanster avatar Oct 08 '22 13:10 Sanster

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

popdog0 avatar Oct 09 '22 07:10 popdog0

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

Sanster avatar Oct 09 '22 07:10 Sanster

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

popdog0 avatar Oct 09 '22 09:10 popdog0

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

walidamrouche avatar Oct 14 '22 12:10 walidamrouche

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 avatar Nov 07 '22 14:11 Sanster

/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

yingdi11 avatar Jan 29 '23 22:01 yingdi11

--gui

Sikafanka avatar Feb 13 '23 16:02 Sikafanka

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?

qingyangmuchen avatar Jun 08 '23 16:06 qingyangmuchen

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

Sanster avatar Jun 09 '23 01:06 Sanster

--model-dir= How to use this?

qingyangmuchen avatar Jun 09 '23 04:06 qingyangmuchen

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.

Sanster avatar Jun 10 '23 12:06 Sanster