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

我安装YOLOX出现了这样的问题,是什么原因呢? #86

Closed
lihui669 opened this issue Jul 22, 2021 · 17 comments
Closed

我安装YOLOX出现了这样的问题,是什么原因呢? #86

lihui669 opened this issue Jul 22, 2021 · 17 comments
Assignees

Comments

@lihui669
Copy link

WARNING: Discarding file:///D:/LH/code/YOLOX-main. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
image

@captainfffsama
Copy link

pytorch vision must >=1.3

@lihui669
Copy link
Author

pytorch vision must >=1.3
您好,我把pytorch换成1.6 依然报相同的错误
image

@myrzx
Copy link

myrzx commented Jul 22, 2021

我把setup.py里读取readme.md的部分注释掉,然后成功安装YOLOX

@TianQingX
Copy link

我把setup.py里读取readme.md的部分注释掉,然后成功安装YOLOX

会报另外一个错误。

ERROR: Command errored out with exit status 1: 'C:\Users\10653.conda\envs\yolox\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'D:\Detection\YOLOX-main\setup.py'"'"'; file='"'"'D:\Detection\YOLOX-main\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

@TianQingX
Copy link

TianQingX commented Jul 23, 2021

环境Win10
image
image
image
image

不知道是不是torch原因不匹配,还是没有装C++的原因?
设备是1660, Turing架构
https://zhuanlan.zhihu.com/p/89858202

(yolox) D:\Detection\YOLOX-main\apex>pip3 install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext"--use-feature=in-tree-build ./
C:\Users\10653.conda\envs\yolox\lib\site-packages\pip_internal\commands\install.py:232: UserWarning: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option.
cmdoptions.check_install_build_global(options)
Using pip 21.1.3 from C:\Users\10653.conda\envs\yolox\lib\site-packages\pip (python 3.7)
Non-user install because site-packages writeable
Created temporary directory: C:\Users\10653\AppData\Local\Temp\pip-ephem-wheel-cache-ab40__rq
Created temporary directory: C:\Users\10653\AppData\Local\Temp\pip-req-tracker-ca4m71x7
Initialized build tracking at C:\Users\10653\AppData\Local\Temp\pip-req-tracker-ca4m71x7
Created build tracker: C:\Users\10653\AppData\Local\Temp\pip-req-tracker-ca4m71x7
Entered build tracker: C:\Users\10653\AppData\Local\Temp\pip-req-tracker-ca4m71x7
Created temporary directory: C:\Users\10653\AppData\Local\Temp\pip-install-ed4yzzl9
Processing d:\detection\yolox-main\apex
Created temporary directory: C:\Users\10653\AppData\Local\Temp\pip-req-build-bxexyfxe
DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
pip 21.3 will remove support for this functionality. You can find discussion regarding this at pypa/pip#7555.
Added file:///D:/Detection/YOLOX-main/apex to build tracker 'C:\Users\10653\AppData\Local\Temp\pip-req-tracker-ca4m71x7'
Running setup.py (path:C:\Users\10653\AppData\Local\Temp\pip-req-build-bxexyfxe\setup.py) egg_info for package from file:///D:/Detection/YOLOX-main/apex
Created temporary directory: C:\Users\10653\AppData\Local\Temp\pip-pip-egg-info-x8w0ngoc
Running command python setup.py egg_info
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\10653\AppData\Local\Temp\pip-req-build-bxexyfxe\setup.py", line 35, in
_, bare_metal_major, _ = get_cuda_bare_metal_version(cpp_extension.CUDA_HOME)
File "C:\Users\10653\AppData\Local\Temp\pip-req-build-bxexyfxe\setup.py", line 14, in get_cuda_bare_metal_version
raw_output = subprocess.check_output([cuda_dir + "/bin/nvcc", "-V"], universal_newlines=True)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Warning: Torch did not find available GPUs on this system.
 If your intention is to cross-compile, this is not an error.
By default, Apex will cross-compile for Pascal (compute capabilities 6.0, 6.1, 6.2),
Volta (compute capability 7.0), Turing (compute capability 7.5),
and, if the CUDA version is >= 11.0, Ampere (compute capability 8.0).
If you wish to cross-compile for a single specific architecture,
export TORCH_CUDA_ARCH_LIST="compute capability" before running setup.py.

WARNING: Discarding file:///D:/Detection/YOLOX-main/apex. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Exception information:
Traceback (most recent call last):
File "C:\Users\10653.conda\envs\yolox\lib\site-packages\pip_internal\cli\base_command.py", line 180, in _main
status = self.run(options, args)
File "C:\Users\10653.conda\envs\yolox\lib\site-packages\pip_internal\cli\req_command.py", line 205, in wrapper
return func(self, options, args)
File "C:\Users\10653.conda\envs\yolox\lib\site-packages\pip_internal\commands\install.py", line 319, in run
reqs, check_supported_wheels=not options.target_dir
File "C:\Users\10653.conda\envs\yolox\lib\site-packages\pip_internal\resolution\resolvelib\resolver.py", line 104, in resolve
req, requested_extras=()
File "C:\Users\10653.conda\envs\yolox\lib\site-packages\pip_internal\resolution\resolvelib\factory.py", line 444, in make_requirement_from_install_req
raise self._build_failures[ireq.link]
File "C:\Users\10653.conda\envs\yolox\lib\site-packages\pip_internal\resolution\resolvelib\factory.py", line 205, in _make_candidate_from_link
version=version,
File "C:\Users\10653.conda\envs\yolox\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 312, in init
version=version,
File "C:\Users\10653.conda\envs\yolox\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 151, in init
self.dist = self._prepare()
File "C:\Users\10653.conda\envs\yolox\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 234, in _prepare
dist = self._prepare_distribution()
File "C:\Users\10653.conda\envs\yolox\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 318, in _prepare_distribution
self._ireq, parallel_builds=True
File "C:\Users\10653.conda\envs\yolox\lib\site-packages\pip_internal\operations\prepare.py", line 508, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "C:\Users\10653.conda\envs\yolox\lib\site-packages\pip_internal\operations\prepare.py", line 571, in _prepare_linked_requirement
req, self.req_tracker, self.finder, self.build_isolation,
File "C:\Users\10653.conda\envs\yolox\lib\site-packages\pip_internal\operations\prepare.py", line 60, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(finder, build_isolation)
File "C:\Users\10653.conda\envs\yolox\lib\site-packages\pip_internal\distributions\sdist.py", line 36, in prepare_distribution_metadata
self.req.prepare_metadata()
File "C:\Users\10653.conda\envs\yolox\lib\site-packages\pip_internal\req\req_install.py", line 549, in prepare_metadata
self.metadata_directory = self._generate_metadata()
File "C:\Users\10653.conda\envs\yolox\lib\site-packages\pip_internal\req\req_install.py", line 529, in _generate_metadata
details=self.name or f"from {self.link}"
File "C:\Users\10653.conda\envs\yolox\lib\site-packages\pip_internal\operations\build\metadata_legacy.py", line 70, in generate_metadata
command_desc='python setup.py egg_info',
File "C:\Users\10653.conda\envs\yolox\lib\site-packages\pip_internal\utils\subprocess.py", line 244, in call_subprocess
raise InstallationSubprocessError(proc.returncode, command_desc)
pip._internal.exceptions.InstallationSubprocessError: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Removed file:///D:/Detection/YOLOX-main/apex from build tracker 'C:\Users\10653\AppData\Local\Temp\pip-req-tracker-ca4m71x7'
Removed build tracker: 'C:\Users\10653\AppData\Local\Temp\pip-req-tracker-ca4m71x7'

@flamebox
Copy link

是的,将open README.md这两句注释掉后,再将最下面的long_description=long_description粗暴改为long_description=“long_description”就可以了。。。

@TianQingX
Copy link

是的,将open README.md这两句注释掉后,再将最下面的long_description=long_description粗暴改为long_description=“long_description”就可以了。。。

是个方法,但我重装了VC之后,把cl文件添加回系统环境变量就可以安装yolo x了
只是又卡在安装apex 报了另外一个错误
image

@lihui669
Copy link
Author

我整个环境终于搭好了

@TianQingX
Copy link

我整个环境终于搭好了

怎么装上去的 兄弟

@TianQingX
Copy link

是的,将open README.md这两句注释掉后,再将最下面的long_description=long_description粗暴改为long_description=“long_description”就可以了。。。

是个方法,但我重装了VC之后,把cl文件添加回系统环境变量就可以安装yolo x了
只是又卡在安装apex 报了另外一个错误
image

根据网页https://blog.csdn.net/weixin_38215769/article/details/106568368
要把第三行命令
pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./
改成
python setup.py install

@alistarhu
Copy link

pytorch vision must >=1.3
您好,我把pytorch换成1.6 依然报相同的错误
image

I meet the same problem when i use python=3.6, because the default encoding is ASCII for python3.6. I fixed it by changing encoding to utf-8 by export PYTHONIOENCODING=utf-8. Or you can choose python3.7 which default encoding is utf-8.

@qmcreeper
Copy link

我把README.md改成ANSI编码就跳过这个问题了

@wang-puwei
Copy link

setup.py里第51行改成,with open("README.md", "r", encoding = 'utf-8') as f: ,就好了

@YUANMU227
Copy link

setup.py里第51行改成,with open("README.md", "r", encoding = 'utf-8') as f: ,就好了

没好呀,兄弟

@YUANMU227
Copy link

我把README.md改成ANSI编码就跳过这个问题了

咋改的兄弟

@YUANMU227
Copy link

我整个环境终于搭好了

咋搞的兄弟

@FateScript
Copy link
Member

Encoding problem has been solved, Feel free to reopen.

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

10 participants