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

安装报错这个如何解决 #41

Closed
liyin37 opened this issue Feb 16, 2020 · 11 comments
Closed

安装报错这个如何解决 #41

liyin37 opened this issue Feb 16, 2020 · 11 comments

Comments

@liyin37
Copy link

liyin37 commented Feb 16, 2020

Collecting certifi>=2017.4.17
Using cached certifi-2019.11.28-py2.py3-none-any.whl (156 kB)
ERROR: requests 2.20.0 has requirement idna<2.8,>=2.5, but you'll have idna 2.8 which is incompatible.
ERROR: requests 2.20.0 has requirement urllib3<1.25,>=1.21.1, but you'll have urllib3 1.25.8 which is incompatible.
Installing collected packages: regex, whaaaaat, pychalk, simplejson, setuptools-git, idna, nose, certifi, chardet, urllib3, requests, requests-toolbelt, pkginfo, tqdm, python-derrick
Running setup.py install for regex ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ru3YeY/regex/setup.py'"'"'; file='"'"'/tmp/pip-install-ru3YeY/regex/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-zdC9ru/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python2.7/regex
cwd: /tmp/pip-install-ru3YeY/regex/
Complete output (20 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/regex
copying regex_2/init.py -> build/lib.linux-x86_64-2.7/regex
copying regex_2/regex.py -> build/lib.linux-x86_64-2.7/regex
copying regex_2/_regex_core.py -> build/lib.linux-x86_64-2.7/regex
copying regex_2/test_regex.py -> build/lib.linux-x86_64-2.7/regex
running build_ext
building 'regex._regex' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/regex_2
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-5Z483E/python2.7-2.7.17=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c regex_2/_regex.c -o build/temp.linux-x86_64-2.7/regex_2/_regex.o
regex_2/_regex.c:48:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ru3YeY/regex/setup.py'"'"'; file='"'"'/tmp/pip-install-ru3YeY/regex/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-zdC9ru/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python2.7/regex Check the logs for full command output.

@ringtail
Copy link
Member

麻烦提供下系统的版本

@liyin37
Copy link
Author

liyin37 commented Feb 17, 2020

麻烦提供下系统的版本
[root@docker ~]# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
[root@docker ~]# python -V
Python 3.7.3
[root@docker ~]#

@ringtail
Copy link
Member

麻烦提供下系统的版本
[root@docker ~]# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
[root@docker ~]# python -V
Python 3.7.3
[root@docker ~]#

好的,我看下Python3.7的兼容性

@ringtail ringtail mentioned this issue Feb 18, 2020
@liyin37
Copy link
Author

liyin37 commented Feb 22, 2020

是更新代码了吗,我使用python 2.7.17 也无法安装
Using cached certifi-2019.11.28-py2.py3-none-any.whl (156 kB)
ERROR: requests 2.22.0 has requirement idna<2.9,>=2.5, but you'll have idna 2.9 which is incompatible.
Installing collected packages: regex, whaaaaat, pychalk, simplejson, setuptools-git, idna, nose, certifi, chardet, urllib3, requests, requests-toolbelt, pkginfo, tqdm, python-derrick
Running setup.py install for regex ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-LpffN8/regex/setup.py'"'"'; file='"'"'/tmp/pip-install-LpffN8/regex/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-afC3n9/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python2.7/regex
cwd: /tmp/pip-install-LpffN8/regex/
Complete output (20 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/regex
copying regex_2/init.py -> build/lib.linux-x86_64-2.7/regex
copying regex_2/regex.py -> build/lib.linux-x86_64-2.7/regex
copying regex_2/_regex_core.py -> build/lib.linux-x86_64-2.7/regex
copying regex_2/test_regex.py -> build/lib.linux-x86_64-2.7/regex
running build_ext
building 'regex._regex' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/regex_2
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-5Z483E/python2.7-2.7.17=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c regex_2/_regex.c -o build/temp.linux-x86_64-2.7/regex_2/_regex.o
regex_2/_regex.c:48:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-LpffN8/regex/setup.py'"'"'; file='"'"'/tmp/pip-install-LpffN8/regex/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-afC3n9/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python2.7/regex Check the logs for full command output.

@ringtail
Copy link
Member

centos需要安装下python-devel

@ringtail
Copy link
Member

另外测试下3.7的版本,应该已经可以工作了

@ringtail
Copy link
Member

if you find some error like: fatal error: Python.h: No such file or directory,Please install python-dev or python-devel with package manager.Windows please use powershell or winshell.

@liyin37
Copy link
Author

liyin37 commented Feb 24, 2020

image
安装完成后执行Derrick 报错了

@liyin37
Copy link
Author

liyin37 commented Feb 24, 2020

Traceback (most recent call last):
File "/usr/bin/derrick", line 5, in
from pkg_resources import load_entry_point
File "/usr/local/python3.7/lib/python3.7/site-packages/pkg_resources/init.py", line 3191, in
@_call_aside
File "/usr/local/python3.7/lib/python3.7/site-packages/pkg_resources/init.py", line 3175, in _call_aside
f(*args, **kwargs)
File "/usr/local/python3.7/lib/python3.7/site-packages/pkg_resources/init.py", line 3204, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/python3.7/lib/python3.7/site-packages/pkg_resources/init.py", line 583, in _build_master
ws.require(requires)
File "/usr/local/python3.7/lib/python3.7/site-packages/pkg_resources/init.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/python3.7/lib/python3.7/site-packages/pkg_resources/init.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'python-derrick==0.1.0' distribution was not found and is required by the application

@ringtail
Copy link
Member

ringtail commented Feb 24, 2020

Try to uninstall the old version and install with the command below pip3 install python-derrick==0.1.2 --index-url=https://pypi.org/simple

@ChongmingDu
Copy link

@ringtail Python 3.7.7 available

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

4 participants