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

error while installing yolox #1781

Open
kd10041 opened this issue Jun 7, 2024 · 6 comments
Open

error while installing yolox #1781

kd10041 opened this issue Jun 7, 2024 · 6 comments

Comments

@kd10041
Copy link

kd10041 commented Jun 7, 2024

  • 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 pypa/pip#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.

@kd10041 kd10041 changed the title Error while installing YOLOX error while installing yolox Jun 18, 2024
@live-sound
Copy link

I have the same issue

@malaccan
Copy link

malaccan commented Jul 5, 2024

i have the exact same issue

@malaccan
Copy link

malaccan commented Jul 5, 2024

actually, i resolved this by downgrading python to 3.10. works fine now. previously, i was trying to install using python 3.12 which resulted in the error below (and as highlighted above):

Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.

@harrisMLEng
Copy link

harrisMLEng commented Jul 22, 2024

I had the same problem and it was a major blocker.

python 3.10
devcontainer linux based image built on aarch platform

I am using devcontainer with a linux based image that is built on aarch (mac). I first used poetry to install the onnx-simplifier but since there is no pre-existing wheels existed for my os distribution pip started to build it from scratch which is basically where the issue begins.

The aarch base for some reason fails to build the wheels for onnx simplifier 0.4.10.

I just changed the onnx-simplifier version to 0.3.10 and it successfully got installed.

I can work on the pull request to enable yolox installation via pip and make the onnx-simplifier fixed version to the latest version

@mhdsiyad
Copy link

mhdsiyad commented Oct 4, 2024

I have this same issue when try to install requirments.txt, MAC M1

@ankit-tejwan
Copy link

python --version
Python 3.10.15

it works for me

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

6 participants