我正在使用一个repo,该repo有一个requirements.txt文件,其中包含lxml==3.8.0,但我们从未实际使用过它,而且在我尝试安装需求文件时,它会导致错误。因此,我从requirements.txt中删除了lxml,并尝试安装,但它仍然尝试安装它。我还尝试使用pipenv安装,同样没有lxml,它也尝试安装lxml。我已经搜索了整个repo,requirements.txt文件是唯一一个有lxml的地方,所以我不认为它隐藏在什么地方。pip安装列出了126个依赖项,但文件中只有125个。我还试着创造一个新的环境,以防环境中有什么奇怪的东西。我也尝试过自己安装lxml,它安装得很好,但安装后安装需求或pip文件仍然会失败。这是唯一一个失败的安装,这里没有其他人知道python或如何使用这个repo。。。
running build_ext
building 'lxml.etree' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/src
creating build/temp.linux-x86_64-3.8/src/lxml
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/libxml2 -Isrc/lxml/includes -I/home/bcoons/.local/share/virtualenvs/sa-tools-new-wboFAptL/include -I/usr/include/python3.8 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-3.8/src/lxml/lxml.etree.o -w
src/lxml/lxml.etree.c: In function ‘__Pyx_PyCFunction_FastCall’:
src/lxml/lxml.etree.c:233279:13: error: too many arguments to function ‘(PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t))meth’
233279 | return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/lxml.etree.c: In function ‘__Pyx_PyDict_Items’:
src/lxml/lxml.etree.c:4532:83: error: too many arguments to function ‘(PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t))__pyx_umethod_PyDict_Type_items.func’
4532 | (PY_VERSION_HEX >= 0x030600B1 && (cfunc)->flag == METH_FASTCALL ? (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL) :
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/lxml.etree.c:233529:16: note: in expansion of macro ‘__Pyx_CallUnboundCMethod0’
233529 | return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_items, d);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/lxml.etree.c: In function ‘__Pyx__ExceptionSave’:
src/lxml/lxml.etree.c:233753:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
233753 | *type = tstate->exc_type;
| ^~~~~~~~
| curexc_type
src/lxml/lxml.etree.c:233754:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
233754 | *value = tstate->exc_value;
| ^~~~~~~~~
| curexc_value
src/lxml/lxml.etree.c:233755:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
233755 | *tb = tstate->exc_traceback;
| ^~~~~~~~~~~~~
| curexc_traceback
src/lxml/lxml.etree.c: In function ‘__Pyx__ExceptionReset’:
src/lxml/lxml.etree.c:233762:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
233762 | tmp_type = tstate->exc_type;
| ^~~~~~~~
| curexc_type
src/lxml/lxml.etree.c:233763:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
233763 | tmp_value = tstate->exc_value;
| ^~~~~~~~~
| curexc_value
src/lxml/lxml.etree.c:233764:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
233764 | tmp_tb = tstate->exc_traceback;
| ^~~~~~~~~~~~~
| curexc_traceback
src/lxml/lxml.etree.c:233765:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
233765 | tstate->exc_type = type;
| ^~~~~~~~
| curexc_type
src/lxml/lxml.etree.c:233766:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
233766 | tstate->exc_value = value;
| ^~~~~~~~~
| curexc_value
src/lxml/lxml.etree.c:233767:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
233767 | tstate->exc_traceback = tb;
| ^~~~~~~~~~~~~
| curexc_traceback
src/lxml/lxml.etree.c: In function ‘__Pyx__GetException’:
src/lxml/lxml.etree.c:233822:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
233822 | tmp_type = tstate->exc_type;
| ^~~~~~~~
| curexc_type
src/lxml/lxml.etree.c:233823:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
233823 | tmp_value = tstate->exc_value;
| ^~~~~~~~~
| curexc_value
src/lxml/lxml.etree.c:233824:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
233824 | tmp_tb = tstate->exc_traceback;
| ^~~~~~~~~~~~~
| curexc_traceback
src/lxml/lxml.etree.c:233825:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
233825 | tstate->exc_type = local_type;
| ^~~~~~~~
| curexc_type
src/lxml/lxml.etree.c:233826:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
233826 | tstate->exc_value = local_value;
| ^~~~~~~~~
| curexc_value
src/lxml/lxml.etree.c:233827:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
233827 | tstate->exc_traceback = local_tb;
| ^~~~~~~~~~~~~
| curexc_traceback
src/lxml/lxml.etree.c: In function ‘__Pyx__ExceptionSwap’:
src/lxml/lxml.etree.c:234160:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
234160 | tmp_type = tstate->exc_type;
| ^~~~~~~~
| curexc_type
src/lxml/lxml.etree.c:234161:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
234161 | tmp_value = tstate->exc_value;
| ^~~~~~~~~
| curexc_value
src/lxml/lxml.etree.c:234162:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
234162 | tmp_tb = tstate->exc_traceback;
| ^~~~~~~~~~~~~
| curexc_traceback
src/lxml/lxml.etree.c:234163:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
234163 | tstate->exc_type = *type;
| ^~~~~~~~
| curexc_type
src/lxml/lxml.etree.c:234164:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
234164 | tstate->exc_value = *value;
| ^~~~~~~~~
| curexc_value
src/lxml/lxml.etree.c:234165:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
234165 | tstate->exc_traceback = *tb;
| ^~~~~~~~~~~~~
| curexc_traceback
src/lxml/lxml.etree.c: In function ‘__Pyx_PyList_Pop’:
src/lxml/lxml.etree.c:4532:83: error: too many arguments to function ‘(PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t))__pyx_umethod_PyList_Type_pop.func’
4532 | (PY_VERSION_HEX >= 0x030600B1 && (cfunc)->flag == METH_FASTCALL ? (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL) :
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/lxml.etree.c:234476:12: note: in expansion of macro ‘__Pyx_CallUnboundCMethod0’
234476 | return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyList_Type_pop, L);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/lxml.etree.c: In function ‘__Pyx_PyDict_Values’:
src/lxml/lxml.etree.c:4532:83: error: too many arguments to function ‘(PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t))__pyx_umethod_PyDict_Type_values.func’
4532 | (PY_VERSION_HEX >= 0x030600B1 && (cfunc)->flag == METH_FASTCALL ? (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL) :
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/lxml.etree.c:235119:16: note: in expansion of macro ‘__Pyx_CallUnboundCMethod0’
235119 | return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_values, d);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
Compile failed: command 'x86_64-linux-gnu-gcc' failed with exit status 1
creating tmp
cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInitheweuye9.c -o tmp/xmlXPathInitheweuye9.o
cc tmp/xmlXPathInitheweuye9.o -lxml2 -o a.out
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for lxml
ERROR: Command errored out with exit status 1:
我的requirements.txt文件:
aiohttp==3.6.1
altgraph==0.16.1
amqp==2.5.2
aniso8601==4.0.1
asn1crypto==0.24.0
astroid==2.3.3
async-timeout==3.0.1
attrdict==2.0.1
attrs==19.2.0
autopep8==1.5.1
bcrypt==3.1.4
billiard==3.6.3.0
blinker==1.4
boto==2.49.0
boto3==1.16.35
botocore==1.19.35
celery==4.4.2
certifi==2020.6.20
cffi
chardet==3.0.4
Click==7.0
click-plugins==1.1.1
clickclick==1.2.2
colorama==0.4.1
connexion==1.1.15
cryptography
decorator==4.3.0
dicttoxml==1.7.4
dis3==0.1.3
enum34==1.1.6
Flask==1.1.1
Flask-Cors==3.0.7
Flask-Limiter==1.0.1
flask-restplus==0.12.1
Flask-SQLAlchemy==2.4.1
future==0.17.1
headless-pdfkit==0.1.5
idna==2.10
idna-ssl==1.1.0
importlib-metadata==1.6.0
inflection==0.5.1
Intercom==0.2.3
ipaddress==1.0.22
isort==4.3.4
itsdangerous==1.1.0
Jinja2==2.10.3
jmespath==0.10.0
jsonschema==3.0.1
keyring==10.6.0
keyrings.alt==3.0
kombu==4.6.8
lazy-object-proxy==1.4.3
limits==1.3
lml==0.0.9
macholib==1.11
MarkupSafe==1.1.1
mccabe==0.6.1
meld3==1.0.2
more-itertools==8.2.0
multidict==4.5.2
mysql-connector==2.2.9
mysql-connector-python==8.0.22
mysqlclient==1.4.5
oauthlib==3.0.1
packaging==20.3
pdfkit==0.6.1
pefile==2018.8.8
plivo==4.1.1
pluggy==0.13.1
protobuf==3.14.0
py==1.8.1
py3dns==3.2.1
pycairo==1.19.1
pycodestyle==2.5.0
pycountry==19.8.18
pycparser==2.18
pycrypto==2.6.1
pyee==7.0.2
pyexcel==0.6.1
pyexcel-io==0.5.20
pyfiglet==0.8.post1
pykeybase==0.4.0
pylint==2.4.4
pyparsing==2.4.7
pyrsistent==0.15.2
pytest==5.4.1
python-crontab==2.3.6
python-dateutil==2.8.0
python-dotenv==0.12.0
python-http-client==3.1.0
python-intercom==3.1.0
pytz==2020.1
pyxdg==0.25
PyYAML==5.1
pyzmq==18.0.1
redis==3.4.1
requests==2.24.0
requests-oauthlib==1.2.0
s3transfer==0.3.3
SecretStorage==2.3.1
sendgrid==6.0.5
shodan==1.19.0
simplejson==3.16.0
six==1.15.0
slackclient==2.2.0
slackeventsapi==2.2.1
SQLAlchemy==1.3.8
supervisor==4.1.0
swagger-spec-validator==2.4.3
texttable==1.6.2
tinys3==0.1.12
tqdm==4.32.1
typed-ast==1.4.1
typing-extensions==3.7.4
urllib3==1.25.10
uWSGI==2.0.18
validate-email==1.3
vine==1.3.0
wcwidth==0.1.9
Werkzeug==0.16.0
wrapt==1.11.2
XlsxWriter==1.2.2
xmltodict==0.12.0
yarl==1.3.0
zipp==3.1.0
和我的pip文件:
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
aiohttp = "==3.6.1"
altgraph = "==0.16.1"
amqp = "==2.5.2"
aniso8601 = "==4.0.1"
asn1crypto = "==0.24.0"
astroid = "==2.3.3"
async-timeout = "==3.0.1"
attrdict = "==2.0.1"
attrs = "==19.2.0"
autopep8 = "==1.5.1"
bcrypt = "==3.1.4"
billiard = "==3.6.3.0"
blinker = "==1.4"
boto = "==2.49.0"
boto3 = "==1.16.35"
botocore = "==1.19.35"
celery = "==4.4.2"
certifi = "==2020.6.20"
cffi = "*"
chardet = "==3.0.4"
click = "==7.0"
click-plugins = "==1.1.1"
clickclick = "==1.2.2"
colorama = "==0.4.1"
connexion = "==1.1.15"
cryptography = "*"
decorator = "==4.3.0"
dicttoxml = "==1.7.4"
dis3 = "==0.1.3"
enum34 = "==1.1.6"
Flask = "==1.1.1"
Flask-Cors = "==3.0.7"
Flask-Limiter = "==1.0.1"
flask-restplus = "==0.12.1"
Flask-SQLAlchemy = "==2.4.1"
future = "==0.17.1"
headless-pdfkit = "==0.1.5"
idna = "==2.10"
idna_ssl = "==1.1.0"
importlib-metadata = "==1.6.0"
inflection = "==0.5.1"
Intercom = "==0.2.3"
ipaddress = "==1.0.22"
isort = "==4.3.4"
itsdangerous = "==1.1.0"
Jinja2 = "==2.10.3"
jmespath = "==0.10.0"
jsonschema = "==3.0.1"
keyring = "==10.6.0"
"keyrings.alt" = "==3.0"
kombu = "==4.6.8"
lazy-object-proxy = "==1.4.3"
limits = "==1.3"
lml = "==0.0.9"
macholib = "==1.11"
MarkupSafe = "==1.1.1"
mccabe = "==0.6.1"
meld3 = "==1.0.2"
more-itertools = "==8.2.0"
multidict = "==4.5.2"
mysql-connector = "==2.2.9"
mysql-connector-python = "==8.0.22"
mysqlclient = "==1.4.5"
oauthlib = "==3.0.1"
pdfkit = "==0.6.1"
pefile = "==2018.8.8"
plivo = "==4.1.1"
pluggy = "==0.13.1"
protobuf = "==3.14.0"
py = "==1.8.1"
py3dns = "==3.2.1"
pycairo = "==1.19.1"
pycodestyle = "==2.5.0"
pycountry = "==19.8.18"
pycparser = "==2.18"
pycrypto = "==2.6.1"
pyee = "==7.0.2"
pyexcel = "==0.6.1"
pyexcel-io = "==0.5.20"
pyfiglet = "==0.8.post1"
pykeybase = "==0.4.0"
pylint = "==2.4.4"
pyparsing = "==2.4.7"
pyrsistent = "==0.15.2"
pytest = "==5.4.1"
python-crontab = "==2.3.6"
python-dateutil = "==2.8.0"
python-dotenv = "==0.12.0"
python-http-client = "==3.1.0"
python-intercom = "==3.1.0"
pytz = "==2020.1"
pyxdg = "==0.25"
PyYAML = "==5.1"
pyzmq = "==18.0.1"
redis = "==3.4.1"
requests = "==2.24.0"
requests-oauthlib = "==1.2.0"
s3transfer = "==0.3.3"
SecretStorage = "==2.3.1"
sendgrid = "==6.0.5"
shodan = "==1.19.0"
simplejson = "==3.16.0"
six = "==1.15.0"
slackclient = "==2.2.0"
slackeventsapi = "==2.2.1"
SQLAlchemy = "==1.3.8"
supervisor = "==4.1.0"
swagger-spec-validator = "==2.4.3"
texttable = "==1.6.2"
tinys3 = "==0.1.12"
tqdm = "==4.32.1"
typed-ast = "==1.4.1"
typing-extensions = "==3.7.4"
urllib3 = "==1.25.10"
uWSGI = "==2.0.18"
validate_email = "==1.3"
vine = "==1.3.0"
wcwidth = "==0.1.9"
Werkzeug = "==0.16.0"
wrapt = "==1.11.2"
XlsxWriter = "==1.2.2"
xmltodict = "==0.12.0"
yarl = "==1.3.0"
zipp = "==3.1.0"
[dev-packages]
[requires]
python_version = "3.8.5"
编辑:这是完整的树:
altgraph==0.16.1
- macholib==1.11 [requires: altgraph>=0.15]
aniso8601==4.0.1
- flask-restplus==0.12.1 [requires: aniso8601>=0.82]
appdirs==1.4.3
asn1crypto==0.24.0
async-timeout==3.0.1
- aiohttp==3.6.1 [requires: async-timeout>=3.0,<4.0]
attrs==19.2.0
- aiohttp==3.6.1 [requires: attrs>=17.3.0]
- jsonschema==3.0.1 [requires: attrs>=17.4.0]
- connexion==1.1.15 [requires: jsonschema>=2.5.1]
- flask-restplus==0.12.1 [requires: jsonschema]
- swagger-spec-validator==2.4.3 [requires: jsonschema]
- connexion==1.1.15 [requires: swagger-spec-validator>=2.0.2]
Automat==0.8.0
billiard==3.6.3.0
- celery==4.4.2 [requires: billiard>=3.6.3.0,<4.0]
blinker==1.4
boto==2.49.0
certifi==2020.6.20
- requests==2.24.0 [requires: certifi>=2017.4.17]
- connexion==1.1.15 [requires: requests>=2.9.1]
chardet==3.0.4
- aiohttp==3.6.1 [requires: chardet>=2.0,<4.0]
- requests==2.24.0 [requires: chardet>=3.0.2,<4]
- connexion==1.1.15 [requires: requests>=2.9.1]
click==7.0
- click-plugins==1.1.1 [requires: click>=4.0]
- clickclick==1.2.2 [requires: click>=4.0]
- connexion==1.1.15 [requires: clickclick>=1.2]
cloud-init==21.1
colorama==0.4.1
command-not-found==0.3
configobj==5.0.6
constantly==15.1.0
cryptography==2.8
dbus-python==1.2.16
decorator==4.3.0
dicttoxml==1.7.4
dis3==0.1.3
distlib==0.3.0
distro==1.4.0
distro-info==0.23ubuntu1
entrypoints==0.3
enum34==1.1.6
filelock==3.0.12
Flask==1.1.1
- connexion==1.1.15 [requires: flask>=0.10.1]
- Flask-Cors==3.0.7 [requires: Flask>=0.9]
- Flask-Limiter==1.0.1 [requires: Flask>=0.8]
- flask-restplus==0.12.1 [requires: Flask>=0.8]
- Flask-SQLAlchemy==2.4.1 [requires: Flask>=0.10]
future==0.17.1
- pefile==2018.8.8 [requires: future]
httplib2==0.14.0
- launchpadlib==1.10.13 [requires: httplib2]
- lazr.restfulclient==0.14.2 [requires: httplib2>=0.7.7]
- launchpadlib==1.10.13 [requires: lazr.restfulclient>=0.9.19]
hyperlink==19.0.0
idna==2.10
- idna-ssl==1.1.0 [requires: idna>=2.0]
- requests==2.24.0 [requires: idna>=2.5,<3]
- connexion==1.1.15 [requires: requests>=2.9.1]
- yarl==1.3.0 [requires: idna>=2.0]
- aiohttp==3.6.1 [requires: yarl>=1.0,<2.0]
incremental==16.10.1
inflection==0.5.1
- connexion==1.1.15 [requires: inflection>=0.3.1]
ipaddress==1.0.22
isort==4.3.4
itsdangerous==1.1.0
jmespath==0.10.0
- boto3==1.16.35 [requires: jmespath>=0.7.1,<1.0.0]
- botocore==1.19.35 [requires: jmespath>=0.7.1,<1.0.0]
- boto3==1.16.35 [requires: botocore>=1.19.35,<1.20.0]
- s3transfer==0.3.3 [requires: botocore>=1.12.36,<2.0a.0]
- boto3==1.16.35 [requires: s3transfer>=0.3.0,<0.4.0]
jsonpatch==1.22
jsonpointer==2.0
language-selector==0.1
lazr.uri==1.0.3
- launchpadlib==1.10.13 [requires: lazr.uri]
lazy-object-proxy==1.4.3
- astroid==2.3.3 [requires: lazy-object-proxy==1.4.*]
lml==0.0.9
lxml==4.6.3
Mako==1.1.0
Markdown==3.1.1
MarkupSafe==1.1.1
- Jinja2==2.10.3 [requires: MarkupSafe>=0.23]
mccabe==0.6.1
meld3==1.0.2
more-itertools==8.2.0
multidict==4.5.2
- aiohttp==3.6.1 [requires: multidict>=4.5,<5.0]
- yarl==1.3.0 [requires: multidict>=4.0]
- aiohttp==3.6.1 [requires: yarl>=1.0,<2.0]
mysql-connector==2.2.9
mysqlclient==1.4.5
netifaces==0.10.4
oauthlib==3.0.1
packaging==20.3
pdfkit==0.6.1
- headless-pdfkit==0.1.5 [requires: pdfkit]
pexpect==4.6.0
pip==20.0.2
pipdeptree==0.13.2
pipenv==11.9.0
pyasn1==0.4.2
pyasn1-modules==0.2.1
pycairo==1.20.1
- PyGObject==3.40.1 [requires: pycairo>=1.16.0]
pycodestyle==2.5.0
- autopep8==1.5.1 [requires: pycodestyle>=2.5.0]
pycparser==2.18
- cffi==1.14.5 [requires: pycparser]
- bcrypt==3.1.4 [requires: cffi>=1.1]
Pygments==2.3.1
PyHamcrest==1.9.0
pyinotify==0.9.6
PyJWT==1.7.1
pymacaroons==0.13.0
PyNaCl==1.3.0
pyOpenSSL==19.0.0
pyparsing==2.4.6
pyserial==3.4
python-apt==2.0.0+ubuntu0.20.4.5
python-debian==0.1.36ubuntu1
pytz==2020.1
- celery==4.4.2 [requires: pytz>dev]
- flask-restplus==0.12.1 [requires: pytz]
pyyaml==5.1
- clickclick==1.2.2 [requires: PyYAML>=3.11]
- connexion==1.1.15 [requires: clickclick>=1.2]
- connexion==1.1.15 [requires: PyYAML>=3.11]
- swagger-spec-validator==2.4.3 [requires: pyyaml]
- connexion==1.1.15 [requires: swagger-spec-validator>=2.0.2]
pyzmq==18.0.1
- Intercom==0.2.3 [requires: pyzmq]
requests-unixsocket==0.2.0
secretstorage==2.3.1
- keyring==10.6.0 [requires: secretstorage]
- launchpadlib==1.10.13 [requires: keyring]
service-identity==18.1.0
setuptools==45.2.0
- jsonschema==3.0.1 [requires: setuptools]
- connexion==1.1.15 [requires: jsonschema>=2.5.1]
- flask-restplus==0.12.1 [requires: jsonschema]
- swagger-spec-validator==2.4.3 [requires: jsonschema]
- connexion==1.1.15 [requires: swagger-spec-validator>=2.0.2]
- launchpadlib==1.10.13 [requires: setuptools]
simplejson==3.16.0
six==1.15.0
- astroid==2.3.3 [requires: six~=1.12]
- attrdict==2.0.1 [requires: six]
- bcrypt==3.1.4 [requires: six>=1.4.1]
- connexion==1.1.15 [requires: six>=1.9]
- Flask-Cors==3.0.7 [requires: Six]
- Flask-Limiter==1.0.1 [requires: six>=1.4.1]
- flask-restplus==0.12.1 [requires: six>=1.3.0]
- jsonschema==3.0.1 [requires: six>=1.11.0]
- connexion==1.1.15 [requires: jsonschema>=2.5.1]
- flask-restplus==0.12.1 [requires: jsonschema]
- swagger-spec-validator==2.4.3 [requires: jsonschema]
- connexion==1.1.15 [requires: swagger-spec-validator>=2.0.2]
- keyrings.alt==3.0 [requires: six]
- launchpadlib==1.10.13 [requires: six]
- limits==1.3 [requires: six>=1.4.1]
- Flask-Limiter==1.0.1 [requires: limits]
- protobuf==3.14.0 [requires: six>=1.9]
- mysql-connector-python==8.0.22 [requires: protobuf>=3.0.0]
- pyrsistent==0.15.2 [requires: six]
- jsonschema==3.0.1 [requires: pyrsistent>=0.14.0]
- connexion==1.1.15 [requires: jsonschema>=2.5.1]
- flask-restplus==0.12.1 [requires: jsonschema]
- swagger-spec-validator==2.4.3 [requires: jsonschema]
- connexion==1.1.15 [requires: swagger-spec-validator>=2.0.2]
- python-dateutil==2.8.0 [requires: six>=1.5]
- botocore==1.19.35 [requires: python-dateutil>=2.1,<3.0.0]
- boto3==1.16.35 [requires: botocore>=1.19.35,<1.20.0]
- s3transfer==0.3.3 [requires: botocore>=1.12.36,<2.0a.0]
- boto3==1.16.35 [requires: s3transfer>=0.3.0,<0.4.0]
- swagger-spec-validator==2.4.3 [requires: six]
- connexion==1.1.15 [requires: swagger-spec-validator>=2.0.2]
sos==4.1
SQLAlchemy==1.3.8
- Flask-SQLAlchemy==2.4.1 [requires: SQLAlchemy>=0.8.0]
ssh-import-id==5.10
systemd-python==234
testresources==?
- launchpadlib==1.10.13 [requires: testresources]
Twisted==18.9.0
ubuntu-advantage-tools==27.0
ufw==0.36
unattended-upgrades==0.1
urllib3==1.25.10
- botocore==1.19.35 [requires: urllib3>=1.25.4,<1.27]
- boto3==1.16.35 [requires: botocore>=1.19.35,<1.20.0]
- s3transfer==0.3.3 [requires: botocore>=1.12.36,<2.0a.0]
- boto3==1.16.35 [requires: s3transfer>=0.3.0,<0.4.0]
- requests==2.24.0 [requires: urllib3>=1.21.1,<1.26,!=1.25.1,!=1.25.0]
- connexion==1.1.15 [requires: requests>=2.9.1]
vine==1.3.0
- amqp==2.5.2 [requires: vine>=1.1.3,<5.0.0a1]
- kombu==4.6.8 [requires: amqp>=2.5.2,<2.6]
- celery==4.4.2 [requires: kombu>=4.6.8,<4.7]
- celery==4.4.2 [requires: vine==1.3.0]
virtualenv==20.0.17
virtualenv-clone==0.3.0
wadllib==1.3.3
- launchpadlib==1.10.13 [requires: wadllib]
Werkzeug==0.16.1
wheel==0.34.2
wrapt==1.11.2
- astroid==2.3.3 [requires: wrapt==1.11.*]
zipp==3.1.0
- importlib-metadata==1.6.0 [requires: zipp>=0.5]
zope.interface==4.7.1
所以lxml显示在那里,但如果它不在任何文件中,并且不是依赖项的依赖项,它从哪里来?我运行了pipenvuninstall-lxml,得到了消息";没有要从Pipfile中删除的包lxml"并重新检查了树,它仍然在那里。
还运行了:sudo apt-get—清除-删除lxml正在读取程序包列表。。。完成构建依赖关系树正在读取状态信息。。。完成E: 无法定位包lxml
编辑:看起来lxml被添加到了pipfile.lock中,尽管它不在pipfile中。所以这很巧妙。我从锁文件中删除了它,一切都正常了,但如果能知道为什么会发生这种情况,那就太好了。
大多数附加的可能是requirements.txt 中指定的某个依赖项的可传递依赖项
您可以使用pipdeptree
pipdeptree -f | tee locked-requirements.txt
Flask==0.10.1
itsdangerous==0.24
Jinja2==2.11.2
MarkupSafe==0.23
Werkzeug==0.11.2
gnureadline==8.0.0
-e git+git@github.com:naiquevin/lookupy.git@cdbe30c160e1c29802df75e145ea4ad903c05386#egg=Lookupy
pipdeptree @ file:///private/tmp/pipdeptree-2.0.0b1-py3-none-any.whl
pip==20.1.1
setuptools==47.1.1
wheel==0.34.2