Megvii-BaseDetection / Megvii-BaseDetection/YOLOX
error while installing yolox
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
- I am facing following error while installing YOLOX. I tried updating pip and setup tools. I need to install YOLOX and use it with the unstructured library for images and table extracting. I am new to python and Machine learning. Please help me regarding the following:
$ pip3 install -v -e .
Using pip 24.0 from C:\Users\k.divyanshu\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip (python 3.12)
DEPRECATION: Loading egg at c:\users\k.divyanshu\appdata\local\programs\python\python312\lib\site-packages\yolox-0.3.0-py3.12.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at https://github.com/pypa/pip/issues/12330
Obtaining file:///C:/Users/k.divyanshu/Desktop/Assignment_3/YOLOX
Running command python setup.py egg_info
C:\Users\k.divyanshu\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools_init_.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
********************************************************************************
!!
dist.fetch_build_eggs(dist.setup_requires)
running egg_info
creating C:\Users\k.divyanshu\AppData\Local\Temp\pip-pip-egg-info-gvopgdih\yolox.egg-info
writing C:\Users\k.divyanshu\AppData\Local\Temp\pip-pip-egg-info-gvopgdih\yolox.egg-info\PKG-INFO
writing dependency_links to C:\Users\k.divyanshu\AppData\Local\Temp\pip-pip-egg-info-gvopgdih\yolox.egg-info\dependency_links.txt
writing requirements to C:\Users\k.divyanshu\AppData\Local\Temp\pip-pip-egg-info-gvopgdih\yolox.egg-info\requires.txt
writing top-level names to C:\Users\k.divyanshu\AppData\Local\Temp\pip-pip-egg-info-gvopgdih\yolox.egg-info\top_level.txt
writing manifest file 'C:\Users\k.divyanshu\AppData\Local\Temp\pip-pip-egg-info-gvopgdih\yolox.egg-info\SOURCES.txt'
reading manifest file 'C:\Users\k.divyanshu\AppData\Local\Temp\pip-pip-egg-info-gvopgdih\yolox.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '.cu' under directory 'yolox'
warning: no files found matching '.cuh' under directory 'yolox'
warning: no files found matching '*.cc' under directory 'yolox'
adding license file 'LICENSE'
writing manifest file 'C:\Users\k.divyanshu\AppData\Local\Temp\pip-pip-egg-info-gvopgdih\yolox.egg-info\SOURCES.txt'
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in c:\users\k.divyanshu\appdata\local\programs\python\python312\lib\site-packages (from yolox==0.3.0) (1.26.4)
Requirement already satisfied: torch>=1.7 in c:\users\k.divyanshu\appdata\local\programs\python\python312\lib\site-packages (from yolox==0.3.0) (2.3.0)
Requirement already satisfied: opencv_python in c:\users\k.divyanshu\appdata\local\programs\python\python312\lib\site-packages (from yolox==0.3.0) (4.10.0.82)
Collecting loguru (from yolox==0.3.0)
Obtaining dependency information for loguru from https://files.pythonhosted.org/packages/03/0a/4f6fed21aa246c6b49b561ca55facacc2a44b87d65b8b92362a8e99ba202/loguru-0.7.2-py3-none-any.whl.metadata
Using cached loguru-0.7.2-py3-none-any.whl.metadata (23 kB)
Requirement already satisfied: tqdm in c:\users\k.divyanshu\appdata\local\programs\python\python312\lib\site-packages (from yolox==0.3.0) (4.66.4)
Requirement already satisfied: torchvision in c:\users\k.divyanshu\appdata\local\programs\python\python312\lib\site-packages (from yolox==0.3.0) (0.18.0)
Collecting thop (from yolox==0.3.0)
Obtaining dependency information for thop from https://files.pythonhosted.org/packages/bb/0f/72beeab4ff5221dc47127c80f8834b4bcd0cb36f6ba91c0b1d04a1233403/thop-0.1.1.post2209072238-py3-none-any.whl.metadata
Using cached thop-0.1.1.post2209072238-py3-none-any.whl.metadata (2.7 kB)
Collecting ninja (from yolox==0.3.0)
Obtaining dependency information for ninja from https://files.pythonhosted.org/packages/b6/2f/a3bc50fa63fc4fe9348e15b53dc8c87febfd4e0c660fcf250c4b19a3aa3b/ninja-1.11.1.1-py2.py3-none-win_amd64.whl.metadata
Using cached ninja-1.11.1.1-py2.py3-none-win_amd64.whl.metadata (5.4 kB)
Requirement already satisfied: tabulate in c:\users\k.divyanshu\appdata\local\programs\python\python312\lib\site-packages (from yolox==0.3.0) (0.9.0)
Requirement already satisfied: psutil in c:\users\k.divyanshu\appdata\local\programs\python\python312\lib\site-packages (from yolox==0.3.0) (5.9.8)
Requirement already satisfied: tensorboard in c:\users\k.divyanshu\appdata\local\programs\python\python312\lib\site-packages (from yolox==0.3.0) (2.16.2)
Requirement already satisfied: pycocotools>=2.0.2 in c:\users\k.divyanshu\appdata\local\programs\python\python312\lib\site-packages (from yolox==0.3.0) (2.0.7)
Requirement already satisfied: onnx>=1.13.0 in c:\users\k.divyanshu\appdata\local\programs\python\python312\lib\site-packages (from yolox==0.3.0) (1.16.1)
Collecting onnx-simplifier==0.4.10 (from yolox==0.3.0)
Using cached onnx-simplifier-0.4.10.tar.gz (18.1 MB)
Running command python setup.py egg_info
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
C:\Users\k.divyanshu\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools_init_.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
********************************************************************************
!!
dist.fetch_build_eggs(dist.setup_requires)
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\k.divyanshu\AppData\Local\Temp\pip-install-lc7w90h_\onnx-simplifier_8fcb2d0d4c6e42d59543676a73ec6b0e\setup.py", line 271, in
setuptools.setup(
File "C:\Users\k.divyanshu\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools_init_.py", line 103, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\k.divyanshu\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools_distutils\core.py", line 146, in setup
_setup_distribution = dist = klass(attrs)
^^^^^^^^^^^^
File "C:\Users\k.divyanshu\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\dist.py", line 318, in init
self.metadata.version = self._normalize_version(self.metadata.version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\k.divyanshu\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\dist.py", line 354, in _normalize_version
normalized = str(Version(version))
^^^^^^^^^^^^^^^^
File "C:\Users\k.divyanshu\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools_vendor\packaging\version.py", line 200, in init
raise InvalidVersion(f"Invalid version: '{version}'")
setuptools.extern.packaging.version.InvalidVersion: Invalid version: 'unknown'
error: subprocess-exited-with-error
× python setup.py egg_info 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.
full command: 'C:\Users\k.divyanshu\AppData\Local\Programs\Python\Python312\python.exe' -c '
exec(compile('"'"''"'"''"'"'
This is -- a caller that pip uses to run setup.py
It imports setuptools before invoking setup.py, to enable projects that directly
import from distutils.core to work with newer packaging standards.
It provides a clear error message when setuptools is not installed.
It sets sys.argv[0] to the underlying setup.py, when invoking setup.py so
setuptools doesn'"'"'t think the script is -c. This avoids the following warning:
manifest_maker: standard file '"'"'-c'"'"' not found".
It generates a shim setup.py, for handling setup.cfg-only projects.
import os, sys, tokenize
try:
import setuptools
except ImportError as error:
print(
"ERROR: Can not execute setup.py since setuptools is not available in "
"the build environment.",
file=sys.stderr,
)
sys.exit(1)
file = %r
sys.argv[0] = file
if os.path.exists(file):
filename = file
with tokenize.open(file) as f:
setup_py_code = f.read()
else:
filename = ""
setup_py_code = "from setuptools import setup; setup()"
exec(compile(setup_py_code, filename, "exec"))
'"'"''"'"''"'"' % ('"'"'C:\Users\k.divyanshu\AppData\Local\Temp\pip-install-lc7w90h_\onnx-simplifier_8fcb2d0d4c6e42d59543676a73ec6b0e\setup.py'"'"',), "", "exec"))' egg_info --egg-base 'C:\Users\k.divyanshu\AppData\Local\Temp\pip-pip-egg-info-pxvn5vaw'
cwd: C:\Users\k.divyanshu\AppData\Local\Temp\pip-install-lc7w90h_\onnx-simplifier_8fcb2d0d4c6e42d59543676a73ec6b0e
Preparing metadata (setup.py) ... error
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the repository's setup.py and MANIFEST.in, then reproduce pip3 install -v -e . using Python 3.12 to inspect the onnx-simplifier metadata failure shown in the report. Done means the YOLOX editable installation completes successfully without the InvalidVersion error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- build-system, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100