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

install.py is unavailable #1

Closed
Langyinnan opened this issue Jun 5, 2023 · 17 comments
Closed

install.py is unavailable #1

Langyinnan opened this issue Jun 5, 2023 · 17 comments

Comments

@Langyinnan
Copy link

install.py doesn't seem to work.It will flash back .

@Langyinnan
Copy link
Author

Traceback (most recent call last):
File "C:\Users\21084\Downloads\WarThunder_Yellow_Mark_Rangefinder-main\WarThunder_Yellow_Mark_Rangefinder-main\distance\code/yolo5\hubconf.py", line 49, in _create
model = DetectMultiBackend(path, device=device, fuse=autoshape) # detection model
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\21084\Downloads\WarThunder_Yellow_Mark_Rangefinder-main\WarThunder_Yellow_Mark_Rangefinder-main\distance\code/yolo5\models\common.py", line 367, in init
import onnxruntime
ModuleNotFoundError: No module named 'onnxruntime'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\21084\Downloads\WarThunder_Yellow_Mark_Rangefinder-main\WarThunder_Yellow_Mark_Rangefinder-main\distance\code/yolo5\hubconf.py", line 60, in _create
model = attempt_load(path, device=device, fuse=False) # arbitrary model
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\21084\Downloads\WarThunder_Yellow_Mark_Rangefinder-main\WarThunder_Yellow_Mark_Rangefinder-main\distance\code/yolo5\models\experimental.py", line 79, in attempt_load
ckpt = torch.load(attempt_download(w), map_location='cpu') # load
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\python3.11.2\Lib\site-packages\torch\serialization.py", line 815, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\python3.11.2\Lib\site-packages\torch\serialization.py", line 1033, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_pickle.UnpicklingError: invalid load key, '\x08'.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\21084\Downloads\WarThunder_Yellow_Mark_Rangefinder-main\WarThunder_Yellow_Mark_Rangefinder-main\distance\miniMap.py", line 57, in
model = torch.hub.load('code/yolo5', 'custom', 'code/yolo5/best.onnx', source='local')#classes="1"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\python3.11.2\Lib\site-packages\torch\hub.py", line 558, in load
model = _load_local(repo_or_dir, model, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\python3.11.2\Lib\site-packages\torch\hub.py", line 587, in _load_local
model = entry(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\21084\Downloads\WarThunder_Yellow_Mark_Rangefinder-main\WarThunder_Yellow_Mark_Rangefinder-main\distance\code/yolo5\hubconf.py", line 83, in custom
return _create(path, autoshape=autoshape, verbose=_verbose, device=device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\21084\Downloads\WarThunder_Yellow_Mark_Rangefinder-main\WarThunder_Yellow_Mark_Rangefinder-main\distance\code/yolo5\hubconf.py", line 78, in _create
raise Exception(s) from e
Exception: invalid load key, '\x08'.. Cache may be out of date, try force_reload=True or see ultralytics/yolov5#36 for help.

@Langyinnan Langyinnan closed this as not planned Won't fix, can't repro, duplicate, stale Jun 5, 2023
@Langyinnan Langyinnan reopened this Jun 5, 2023
@Yonisen
Copy link
Owner

Yonisen commented Jun 5, 2023

then first try to open cmd in the same folder as install.py, and then write install.py to console and press enter and send the output
image

@Langyinnan
Copy link
Author

C:\Users\21084\Downloads\WarThunder_Yellow_Mark_Rangefinder-main\WarThunder_Yellow_Mark_Rangefinder-main\distance>install.py

C:\Users\21084\Downloads\WarThunder_Yellow_Mark_Rangefinder-main\WarThunder_Yellow_Mark_Rangefinder-main\distance>Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting ipython (from -r code/yolo5/requirements.txt (line 5))
Downloading ipython-8.14.0-py3-none-any.whl (798 kB)
━╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 30.7/798.7 kB 17.0 kB/s eta 0:00:46
ERROR: Exception:
Traceback (most recent call last):
File "D:\python\lib\site-packages\pip_vendor\urllib3\response.py", line 438, in _error_catcher
yield
File "D:\python\lib\site-packages\pip_vendor\urllib3\response.py", line 561, in read
data = self._fp_read(amt) if not fp_closed else b""
File "D:\python\lib\site-packages\pip_vendor\urllib3\response.py", line 527, in _fp_read
return self._fp.read(amt) if amt is not None else self._fp.read()
File "D:\python\lib\http\client.py", line 465, in read
s = self.fp.read(amt)
File "D:\python\lib\socket.py", line 705, in readinto
return self._sock.recv_into(b)
File "D:\python\lib\ssl.py", line 1274, in recv_into
return self.read(nbytes, buffer)
File "D:\python\lib\ssl.py", line 1130, in read
return self._sslobj.read(len, buffer)
TimeoutError: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\python\lib\site-packages\pip_internal\cli\base_command.py", line 169, in exc_logging_wrapper
status = run_func(*args)
File "D:\python\lib\site-packages\pip_internal\cli\req_command.py", line 248, in wrapper
return func(self, options, args)
File "D:\python\lib\site-packages\pip_internal\commands\install.py", line 377, in run
requirement_set = resolver.resolve(
File "D:\python\lib\site-packages\pip_internal\resolution\resolvelib\resolver.py", line 92, in resolve
result = self._result = resolver.resolve(
File "D:\python\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 546, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "D:\python\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 397, in resolve
self._add_to_criteria(self.state.criteria, r, parent=None)
File "D:\python\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 173, in _add_to_criteria
if not criterion.candidates:
File "D:\python\lib\site-packages\pip_vendor\resolvelib\structs.py", line 156, in bool
return bool(self._sequence)
File "D:\python\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 155, in bool
return any(self)
File "D:\python\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 143, in
return (c for c in iterator if id(c) not in self._incompatible_ids)
File "D:\python\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 47, in _iter_built
candidate = func()
File "D:\python\lib\site-packages\pip_internal\resolution\resolvelib\factory.py", line 206, in _make_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
File "D:\python\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 293, in init
super().init(
File "D:\python\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 156, in init
self.dist = self._prepare()
File "D:\python\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 225, in _prepare
dist = self._prepare_distribution()
File "D:\python\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 304, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
File "D:\python\lib\site-packages\pip_internal\operations\prepare.py", line 516, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "D:\python\lib\site-packages\pip_internal\operations\prepare.py", line 587, in _prepare_linked_requirement
local_file = unpack_url(
File "D:\python\lib\site-packages\pip_internal\operations\prepare.py", line 166, in unpack_url
file = get_http_url(
File "D:\python\lib\site-packages\pip_internal\operations\prepare.py", line 107, in get_http_url
from_path, content_type = download(link, temp_dir.path)
File "D:\python\lib\site-packages\pip_internal\network\download.py", line 147, in call
for chunk in chunks:
File "D:\python\lib\site-packages\pip_internal\cli\progress_bars.py", line 53, in _rich_progress_bar
for chunk in iterable:
File "D:\python\lib\site-packages\pip_internal\network\utils.py", line 63, in response_chunks
for chunk in response.raw.stream(
File "D:\python\lib\site-packages\pip_vendor\urllib3\response.py", line 622, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "D:\python\lib\site-packages\pip_vendor\urllib3\response.py", line 560, in read
with self._error_catcher():
File "D:\python\lib\contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "D:\python\lib\site-packages\pip_vendor\urllib3\response.py", line 443, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

@Langyinnan
Copy link
Author

屏幕截图 2023-06-05 225221

@Yonisen
Copy link
Owner

Yonisen commented Jun 6, 2023

when installing starts, how many seconds it hangs before an error message?
I think you are getting timeout because of slow internet or something like this

image

@Yonisen
Copy link
Owner

Yonisen commented Jun 6, 2023

what is your country?

@Langyinnan
Copy link
Author

China

@Langyinnan
Copy link
Author

C:\Users\21084\Downloads\WarThunder_Yellow_Mark_Rangefinder-main\WarThunder_Yellow_Mark_Rangefinder-main\distance>install.py

C:\Users\21084\Downloads\WarThunder_Yellow_Mark_Rangefinder-main\WarThunder_Yellow_Mark_Rangefinder-main\distance>Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting ipython (from -r code/yolo5/requirements.txt (line 5))
Downloading ipython-8.14.0-py3-none-any.whl (798 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 798.7/798.7 kB 6.6 kB/s eta 0:00:00
Requirement already satisfied: matplotlib>=3.2.2 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 6)) (3.7.1)
Requirement already satisfied: numpy>=1.18.5 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 7)) (1.23.4)
Requirement already satisfied: opencv-python>=4.1.1 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 8)) (4.7.0.72)
Requirement already satisfied: Pillow>=7.1.2 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 9)) (9.5.0)
Requirement already satisfied: psutil in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 10)) (5.9.5)
Requirement already satisfied: PyYAML>=5.3.1 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 11)) (6.0)
Requirement already satisfied: requests>=2.23.0 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 12)) (2.30.0)
Requirement already satisfied: scipy>=1.4.1 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 13)) (1.10.1)
Requirement already satisfied: thop>=0.1.1 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 14)) (0.1.1.post2209072238)
Requirement already satisfied: torch>=1.7.0 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 15)) (2.0.1)
Requirement already satisfied: torchvision>=0.8.1 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 16)) (0.15.2)
Requirement already satisfied: tqdm>=4.64.0 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 17)) (4.65.0)
Collecting tk (from -r code/yolo5/requirements.txt (line 19))
Downloading tk-0.1.0-py3-none-any.whl (3.9 kB)
Collecting pywin32 (from -r code/yolo5/requirements.txt (line 20))
Downloading pywin32-306-cp310-cp310-win_amd64.whl (9.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.2/9.2 MB 147.0 kB/s eta 0:00:00
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/pyautogui/
Collecting pyautogui (from -r code/yolo5/requirements.txt (line 21))
Downloading PyAutoGUI-0.9.54.tar.gz (61 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.2/61.2 kB 66.7 kB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting pynput (from -r code/yolo5/requirements.txt (line 22))
Downloading pynput-1.7.6-py2.py3-none-any.whl (89 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.2/89.2 kB 101.0 kB/s eta 0:00:00
Collecting onnx (from -r code/yolo5/requirements.txt (line 23))
Downloading onnx-1.14.0-cp310-cp310-win_amd64.whl (13.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.3/13.3 MB 204.5 kB/s eta 0:00:00
Requirement already satisfied: onnxruntime in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 24)) (1.15.0)
Collecting tensorboard>=2.4.1 (from -r code/yolo5/requirements.txt (line 27))
Downloading tensorboard-2.13.0-py3-none-any.whl (5.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.6/5.6 MB 194.3 kB/s eta 0:00:00
Requirement already satisfied: pandas>=1.1.4 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 32)) (1.3.5)
Requirement already satisfied: seaborn>=0.11.0 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 33)) (0.12.2)
Collecting backcall (from ipython->-r code/yolo5/requirements.txt (line 5))
Downloading backcall-0.2.0-py2.py3-none-any.whl (11 kB)
Collecting decorator (from ipython->-r code/yolo5/requirements.txt (line 5))
Downloading decorator-5.1.1-py3-none-any.whl (9.1 kB)
Collecting jedi>=0.16 (from ipython->-r code/yolo5/requirements.txt (line 5))
Downloading jedi-0.18.2-py2.py3-none-any.whl (1.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 179.3 kB/s eta 0:00:00
Collecting matplotlib-inline (from ipython->-r code/yolo5/requirements.txt (line 5))
Downloading matplotlib_inline-0.1.6-py3-none-any.whl (9.4 kB)
Collecting pickleshare (from ipython->-r code/yolo5/requirements.txt (line 5))
Downloading pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
Collecting prompt-toolkit!=3.0.37,<3.1.0,>=3.0.30 (from ipython->-r code/yolo5/requirements.txt (line 5))
Downloading prompt_toolkit-3.0.38-py3-none-any.whl (385 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 385.8/385.8 kB 286.3 kB/s eta 0:00:00
Collecting pygments>=2.4.0 (from ipython->-r code/yolo5/requirements.txt (line 5))
Downloading Pygments-2.15.1-py3-none-any.whl (1.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 8.8 kB/s eta 0:00:00
Collecting stack-data (from ipython->-r code/yolo5/requirements.txt (line 5))
Downloading stack_data-0.6.2-py3-none-any.whl (24 kB)
Collecting traitlets>=5 (from ipython->-r code/yolo5/requirements.txt (line 5))
Downloading traitlets-5.9.0-py3-none-any.whl (117 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 117.4/117.4 kB 6.3 kB/s eta 0:00:00
Requirement already satisfied: colorama in d:\python\lib\site-packages (from ipython->-r code/yolo5/requirements.txt (line 5)) (0.4.6)
Requirement already satisfied: contourpy>=1.0.1 in d:\python\lib\site-packages (from matplotlib>=3.2.2->-r code/yolo5/requirements.txt (line 6)) (1.0.7)
Requirement already satisfied: cycler>=0.10 in d:\python\lib\site-packages (from matplotlib>=3.2.2->-r code/yolo5/requirements.txt (line 6)) (0.10.0)
Requirement already satisfied: fonttools>=4.22.0 in d:\python\lib\site-packages (from matplotlib>=3.2.2->-r code/yolo5/requirements.txt (line 6)) (4.39.4)
Requirement already satisfied: kiwisolver>=1.0.1 in d:\python\lib\site-packages (from matplotlib>=3.2.2->-r code/yolo5/requirements.txt (line 6)) (1.4.4)
Requirement already satisfied: packaging>=20.0 in d:\python\lib\site-packages (from matplotlib>=3.2.2->-r code/yolo5/requirements.txt (line 6)) (23.1)
Requirement already satisfied: pyparsing>=2.3.1 in d:\python\lib\site-packages (from matplotlib>=3.2.2->-r code/yolo5/requirements.txt (line 6)) (2.4.7)
Requirement already satisfied: python-dateutil>=2.7 in d:\python\lib\site-packages (from matplotlib>=3.2.2->-r code/yolo5/requirements.txt (line 6)) (2.8.2)
Requirement already satisfied: charset-normalizer<4,>=2 in d:\python\lib\site-packages (from requests>=2.23.0->-r code/yolo5/requirements.txt (line 12)) (3.1.0)
Requirement already satisfied: idna<4,>=2.5 in d:\python\lib\site-packages (from requests>=2.23.0->-r code/yolo5/requirements.txt (line 12)) (2.10)
Requirement already satisfied: urllib3<3,>=1.21.1 in d:\python\lib\site-packages (from requests>=2.23.0->-r code/yolo5/requirements.txt (line 12)) (1.26.15)
Requirement already satisfied: certifi>=2017.4.17 in d:\python\lib\site-packages (from requests>=2.23.0->-r code/yolo5/requirements.txt (line 12)) (2022.12.7)
Requirement already satisfied: filelock in d:\python\lib\site-packages (from torch>=1.7.0->-r code/yolo5/requirements.txt (line 15)) (3.12.0)
Requirement already satisfied: typing-extensions in d:\python\lib\site-packages (from torch>=1.7.0->-r code/yolo5/requirements.txt (line 15)) (4.5.0)
Requirement already satisfied: sympy in d:\python\lib\site-packages (from torch>=1.7.0->-r code/yolo5/requirements.txt (line 15)) (1.12)
Requirement already satisfied: networkx in d:\python\lib\site-packages (from torch>=1.7.0->-r code/yolo5/requirements.txt (line 15)) (2.8.8)
Requirement already satisfied: jinja2 in d:\python\lib\site-packages (from torch>=1.7.0->-r code/yolo5/requirements.txt (line 15)) (3.1.2)
Collecting pymsgbox (from pyautogui->-r code/yolo5/requirements.txt (line 21))
Downloading PyMsgBox-1.0.9.tar.gz (18 kB)
Installing build dependencies ... error
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [3 lines of output]
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com, https://pypi.ngc.nvidia.com
ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: none)
ERROR: No matching distribution found for setuptools>=40.8.0
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies 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.

@Langyinnan
Copy link
Author

error.log the report is as follows

Traceback (most recent call last):
File "C:\Users\21084\Downloads\WarThunder_Yellow_Mark_Rangefinder-main\WarThunder_Yellow_Mark_Rangefinder-main\distance\code/yolo5\hubconf.py", line 49, in _create
model = DetectMultiBackend(path, device=device, fuse=autoshape) # detection model
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\21084\Downloads\WarThunder_Yellow_Mark_Rangefinder-main\WarThunder_Yellow_Mark_Rangefinder-main\distance\code/yolo5\models\common.py", line 367, in init
import onnxruntime
ModuleNotFoundError: No module named 'onnxruntime'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\21084\Downloads\WarThunder_Yellow_Mark_Rangefinder-main\WarThunder_Yellow_Mark_Rangefinder-main\distance\code/yolo5\hubconf.py", line 60, in _create
model = attempt_load(path, device=device, fuse=False) # arbitrary model
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\21084\Downloads\WarThunder_Yellow_Mark_Rangefinder-main\WarThunder_Yellow_Mark_Rangefinder-main\distance\code/yolo5\models\experimental.py", line 79, in attempt_load
ckpt = torch.load(attempt_download(w), map_location='cpu') # load
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\python3.11.2\Lib\site-packages\torch\serialization.py", line 815, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\python3.11.2\Lib\site-packages\torch\serialization.py", line 1033, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_pickle.UnpicklingError: invalid load key, '\x08'.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\21084\Downloads\WarThunder_Yellow_Mark_Rangefinder-main\WarThunder_Yellow_Mark_Rangefinder-main\distance\miniMap.py", line 57, in
model = torch.hub.load('code/yolo5', 'custom', 'code/yolo5/best.onnx', source='local')#classes="1"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\python3.11.2\Lib\site-packages\torch\hub.py", line 558, in load
model = _load_local(repo_or_dir, model, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\python3.11.2\Lib\site-packages\torch\hub.py", line 587, in _load_local
model = entry(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\21084\Downloads\WarThunder_Yellow_Mark_Rangefinder-main\WarThunder_Yellow_Mark_Rangefinder-main\distance\code/yolo5\hubconf.py", line 83, in custom
return _create(path, autoshape=autoshape, verbose=_verbose, device=device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\21084\Downloads\WarThunder_Yellow_Mark_Rangefinder-main\WarThunder_Yellow_Mark_Rangefinder-main\distance\code/yolo5\hubconf.py", line 78, in _create
raise Exception(s) from e
Exception: invalid load key, '\x08'.. Cache may be out of date, try force_reload=True or see ultralytics/yolov5#36 for help.

@Langyinnan
Copy link
Author

My computer has two pythons, one for version 3.10.6 and the other for version 3.11.2
I don't know if it's because of this problem

@Yonisen
Copy link
Owner

Yonisen commented Jun 7, 2023

I think the installation fails, since you are connecting from China to the European servers, so I changed some settings, now the download should be from Chinese servers and faster. I updated the repository try one from installChina.py instead of install.py

@Langyinnan
Copy link
Author

Is this the end of the installation?
Thank you very much for your help
屏幕截图 2023-06-07 213226

@Langyinnan
Copy link
Author

miniMap.py Not functioning properly

2023-06-07.213853.mp4

@Yonisen
Copy link
Owner

Yonisen commented Jun 7, 2023

dude, you need to wait until the installation completes
"Successfully Installed" will appear
or you can now just double-click the installation and wait for it to close, as instructed

@Langyinnan
Copy link
Author

It's been almost three hours, only this is displayed, and the installation is not displayed

Microsoft Windows [版本 10.0.25381.1200]
(c) Microsoft Corporation。保留所有权利。

C:\Users\21084\Desktop\WarThunder_Yellow_Mark_Rangefinder-main\WarThunder_Yellow_Mark_Rangefinder-main\distance>installChina1.py

C:\Users\21084\Desktop\WarThunder_Yellow_Mark_Rangefinder-main\WarThunder_Yellow_Mark_Rangefinder-main\distance>Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple, https://pypi.ngc.nvidia.com
Requirement already satisfied: ipython in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 5)) (8.13.2)
Requirement already satisfied: matplotlib>=3.2.2 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 6)) (3.7.1)
Requirement already satisfied: numpy>=1.18.5 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 7)) (1.23.4)
Requirement already satisfied: opencv-python>=4.1.1 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 8)) (4.7.0.72)
Requirement already satisfied: Pillow>=7.1.2 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 9)) (9.5.0)
Requirement already satisfied: psutil in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 10)) (5.9.5)
Requirement already satisfied: PyYAML>=5.3.1 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 11)) (6.0)
Requirement already satisfied: requests>=2.23.0 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 12)) (2.30.0)
Requirement already satisfied: scipy>=1.4.1 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 13)) (1.10.1)
Requirement already satisfied: thop>=0.1.1 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 14)) (0.1.1.post2209072238)
Requirement already satisfied: torch>=1.7.0 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 15)) (2.0.1)
Requirement already satisfied: torchvision>=0.8.1 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 16)) (0.15.2)
Requirement already satisfied: tqdm>=4.64.0 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 17)) (4.65.0)
Requirement already satisfied: tk in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 19)) (0.1.0)Requirement already satisfied: pywin32 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 20)) (306)
Requirement already satisfied: pyautogui in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 21)) (0.9.53)
Requirement already satisfied: pynput in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 22)) (1.7.6)
Requirement already satisfied: onnx in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 23)) (1.14.0)
Requirement already satisfied: onnxruntime in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 24)) (1.15.0)
Requirement already satisfied: tensorboard>=2.4.1 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 27)) (2.13.0)
Requirement already satisfied: pandas>=1.1.4 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 32)) (1.3.5)
Requirement already satisfied: seaborn>=0.11.0 in d:\python\lib\site-packages (from -r code/yolo5/requirements.txt (line 33)) (0.12.2)
Requirement already satisfied: backcall in d:\python\lib\site-packages (from ipython->-r code/yolo5/requirements.txt (line 5)) (0.2.0)
Requirement already satisfied: decorator in d:\python\lib\site-packages (from ipython->-r code/yolo5/requirements.txt (line 5)) (5.1.1)
Requirement already satisfied: jedi>=0.16 in d:\python\lib\site-packages (from ipython->-r code/yolo5/requirements.txt (line 5)) (0.18.2)
Requirement already satisfied: matplotlib-inline in d:\python\lib\site-packages (from ipython->-r code/yolo5/requirements.txt (line 5)) (0.1.6)
Requirement already satisfied: pickleshare in d:\python\lib\site-packages (from ipython->-r code/yolo5/requirements.txt (line 5)) (0.7.5)
Requirement already satisfied: prompt-toolkit!=3.0.37,<3.1.0,>=3.0.30 in d:\python\lib\site-packages (from ipython->-r code/yolo5/requirements.txt (line 5)) (3.0.38)
Requirement already satisfied: pygments>=2.4.0 in d:\python\lib\site-packages (from ipython->-r code/yolo5/requirements.txt (line 5)) (2.15.1)
Requirement already satisfied: stack-data in d:\python\lib\site-packages (from ipython->-r code/yolo5/requirements.txt (line 5)) (0.6.2)
Requirement already satisfied: traitlets>=5 in d:\python\lib\site-packages (from ipython->-r code/yolo5/requirements.txt (line 5)) (5.9.0)
Requirement already satisfied: colorama in d:\python\lib\site-packages (from ipython->-r code/yolo5/requirements.txt (line 5)) (0.4.6)
Requirement already satisfied: contourpy>=1.0.1 in d:\python\lib\site-packages (from matplotlib>=3.2.2->-r code/yolo5/requirements.txt (line 6)) (1.0.7)
Requirement already satisfied: cycler>=0.10 in d:\python\lib\site-packages (from matplotlib>=3.2.2->-r code/yolo5/requirements.txt (line 6)) (0.10.0)
Requirement already satisfied: fonttools>=4.22.0 in d:\python\lib\site-packages (from matplotlib>=3.2.2->-r code/yolo5/requirements.txt (line 6)) (4.39.4)
Requirement already satisfied: kiwisolver>=1.0.1 in d:\python\lib\site-packages (from matplotlib>=3.2.2->-r code/yolo5/requirements.txt (line 6)) (1.4.4)
Requirement already satisfied: packaging>=20.0 in d:\python\lib\site-packages (from matplotlib>=3.2.2->-r code/yolo5/requirements.txt (line 6)) (23.1)
Requirement already satisfied: pyparsing>=2.3.1 in d:\python\lib\site-packages (from matplotlib>=3.2.2->-r code/yolo5/requirements.txt (line 6)) (2.4.7)
Requirement already satisfied: python-dateutil>=2.7 in d:\python\lib\site-packages (from matplotlib>=3.2.2->-r code/yolo5/requirements.txt (line 6)) (2.8.2)
Requirement already satisfied: charset-normalizer<4,>=2 in d:\python\lib\site-packages (from requests>=2.23.0->-r code/yolo5/requirements.txt (line 12)) (3.1.0)
Requirement already satisfied: idna<4,>=2.5 in d:\python\lib\site-packages (from requests>=2.23.0->-r code/yolo5/requirements.txt (line 12)) (2.10)
Requirement already satisfied: urllib3<3,>=1.21.1 in d:\python\lib\site-packages (from requests>=2.23.0->-r code/yolo5/requirements.txt (line 12)) (1.26.15)
Requirement already satisfied: certifi>=2017.4.17 in d:\python\lib\site-packages (from requests>=2.23.0->-r code/yolo5/requirements.txt (line 12)) (2022.12.7)
Requirement already satisfied: filelock in d:\python\lib\site-packages (from torch>=1.7.0->-r code/yolo5/requirements.txt (line 15)) (3.12.0)
Requirement already satisfied: typing-extensions in d:\python\lib\site-packages (from torch>=1.7.0->-r code/yolo5/requirements.txt (line 15)) (4.5.0)
Requirement already satisfied: sympy in d:\python\lib\site-packages (from torch>=1.7.0->-r code/yolo5/requirements.txt (line 15)) (1.12)
Requirement already satisfied: networkx in d:\python\lib\site-packages (from torch>=1.7.0->-r code/yolo5/requirements.txt (line 15)) (2.8.8)
Requirement already satisfied: jinja2 in d:\python\lib\site-packages (from torch>=1.7.0->-r code/yolo5/requirements.txt (line 15)) (3.1.2)
Requirement already satisfied: pymsgbox in d:\python\lib\site-packages (from pyautogui->-r code/yolo5/requirements.txt (line 21)) (1.0.9)
Requirement already satisfied: PyTweening>=1.0.1 in d:\python\lib\site-packages (from pyautogui->-r code/yolo5/requirements.txt (line 21)) (1.0.7)
Requirement already satisfied: pyscreeze>=0.1.21 in d:\python\lib\site-packages (from pyautogui->-r code/yolo5/requirements.txt (line 21)) (0.1.28)
Requirement already satisfied: pygetwindow>=0.0.5 in d:\python\lib\site-packages (from pyautogui->-r code/yolo5/requirements.txt (line 21)) (0.0.9)
Requirement already satisfied: mouseinfo in d:\python\lib\site-packages (from pyautogui->-r code/yolo5/requirements.txt (line 21)) (0.1.3)
Requirement already satisfied: six in d:\python\lib\site-packages (from pynput->-r code/yolo5/requirements.txt (line 22)) (1.16.0)
Requirement already satisfied: protobuf>=3.20.2 in d:\python\lib\site-packages (from onnx->-r code/yolo5/requirements.txt (line 23)) (4.23.2)
Requirement already satisfied: coloredlogs in d:\python\lib\site-packages (from onnxruntime->-r code/yolo5/requirements.txt (line 24)) (15.0.1)
Requirement already satisfied: flatbuffers in d:\python\lib\site-packages (from onnxruntime->-r code/yolo5/requirements.txt (line 24)) (23.5.26)
Requirement already satisfied: absl-py>=0.4 in d:\python\lib\site-packages (from tensorboard>=2.4.1->-r code/yolo5/requirements.txt (line 27)) (1.4.0)
Requirement already satisfied: grpcio>=1.48.2 in d:\python\lib\site-packages (from tensorboard>=2.4.1->-r code/yolo5/requirements.txt (line 27)) (1.54.2)
Requirement already satisfied: google-auth<3,>=1.6.3 in d:\python\lib\site-packages (from tensorboard>=2.4.1->-r code/yolo5/requirements.txt (line 27)) (2.18.0)
Requirement already satisfied: google-auth-oauthlib<1.1,>=0.5 in d:\python\lib\site-packages (from tensorboard>=2.4.1->-r code/yolo5/requirements.txt (line 27)) (1.0.0)
Requirement already satisfied: markdown>=2.6.8 in d:\python\lib\site-packages (from tensorboard>=2.4.1->-r code/yolo5/requirements.txt (line 27)) (3.4.3)
Requirement already satisfied: setuptools>=41.0.0 in d:\python\lib\site-packages (from tensorboard>=2.4.1->-r code/yolo5/requirements.txt (line 27)) (63.2.0)
Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in d:\python\lib\site-packages (from tensorboard>=2.4.1->-r code/yolo5/requirements.txt (line 27)) (0.7.0)
Requirement already satisfied: werkzeug>=1.0.1 in d:\python\lib\site-packages (from tensorboard>=2.4.1->-r code/yolo5/requirements.txt (line 27)) (2.3.4)
Requirement already satisfied: wheel>=0.26 in d:\python\lib\site-packages (from tensorboard>=2.4.1->-r code/yolo5/requirements.txt (line 27)) (0.40.0)
Requirement already satisfied: pytz>=2017.3 in d:\python\lib\site-packages (from pandas>=1.1.4->-r code/yolo5/requirements.txt (line 32)) (2023.3)
Requirement already satisfied: cachetools<6.0,>=2.0.0 in d:\python\lib\site-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r code/yolo5/requirements.txt (line 27)) (5.3.0)
Requirement already satisfied: pyasn1-modules>=0.2.1 in d:\python\lib\site-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r code/yolo5/requirements.txt (line 27)) (0.3.0)
Requirement already satisfied: rsa<5,>=3.1.4 in d:\python\lib\site-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r code/yolo5/requirements.txt (line 27)) (4.9)
Requirement already satisfied: requests-oauthlib>=0.7.0 in d:\python\lib\site-packages (from google-auth-oauthlib<1.1,>=0.5->tensorboard>=2.4.1->-r code/yolo5/requirements.txt (line 27)) (1.3.1)
Requirement already satisfied: parso<0.9.0,>=0.8.0 in d:\python\lib\site-packages (from jedi>=0.16->ipython->-r code/yolo5/requirements.txt (line 5)) (0.8.3)
Requirement already satisfied: wcwidth in d:\python\lib\site-packages (from prompt-toolkit!=3.0.37,<3.1.0,>=3.0.30->ipython->-r code/yolo5/requirements.txt (line 5)) (0.2.6)
Requirement already satisfied: pyrect in d:\python\lib\site-packages (from pygetwindow>=0.0.5->pyautogui->-r code/yolo5/requirements.txt (line 21)) (0.2.0)
Requirement already satisfied: MarkupSafe>=2.1.1 in d:\python\lib\site-packages (from werkzeug>=1.0.1->tensorboard>=2.4.1->-r code/yolo5/requirements.txt (line 27)) (2.1.2)
Requirement already satisfied: humanfriendly>=9.1 in d:\python\lib\site-packages (from coloredlogs->onnxruntime->-r code/yolo5/requirements.txt (line 24)) (10.0)
Requirement already satisfied: pyperclip in d:\python\lib\site-packages (from mouseinfo->pyautogui->-r code/yolo5/requirements.txt (line 21)) (1.8.2)
Requirement already satisfied: executing>=1.2.0 in d:\python\lib\site-packages (from stack-data->ipython->-r code/yolo5/requirements.txt (line 5)) (1.2.0)
Requirement already satisfied: asttokens>=2.1.0 in d:\python\lib\site-packages (from stack-data->ipython->-r code/yolo5/requirements.txt (line 5)) (2.2.1)
Requirement already satisfied: pure-eval in d:\python\lib\site-packages (from stack-data->ipython->-r code/yolo5/requirements.txt (line 5)) (0.2.2)
Requirement already satisfied: mpmath>=0.19 in d:\python\lib\site-packages (from sympy->torch>=1.7.0->-r code/yolo5/requirements.txt (line 15)) (1.3.0)
Requirement already satisfied: pyreadline3 in d:\python\lib\site-packages (from humanfriendly>=9.1->coloredlogs->onnxruntime->-r code/yolo5/requirements.txt (line 24)) (3.4.1)
Requirement already satisfied: pyasn1<0.6.0,>=0.4.6 in d:\python\lib\site-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r code/yolo5/requirements.txt (line 27)) (0.5.0)
Requirement already satisfied: oauthlib>=3.0.0 in d:\python\lib\site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<1.1,>=0.5->tensorboard>=2.4.1->-r code/yolo5/requirements.txt (line 27)) (3.2.2)

@Yonisen
Copy link
Owner

Yonisen commented Jun 8, 2023

okay, I didn’t pay attention right away, your installation was completed last time, you could not wait 3 hours. But at the same time, it writes to you that onnx is not installed, try to completely remove 2 python versions, and install one that is needed according to the instructions, then again, as per the instructions from the very beginning, make the installChina.py

@Langyinnan
Copy link
Author

Thank you for your help, it works

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