简体   繁体   中英

Why is pip installing a dependency that is not in the pipfile?

I am working with a repo that has a requirements.txt file that includes lxml==3.8.0, but we never actually use it and it is causing errors when I try to install the requirements file. So I removed lxml from the requirements.txt and tried to install and it still tries to install it. I also tried using pipenv install instead, again with no lxml, and it also tries to install lxml. I have searched the entire repo and the requirements.txt file is the only place that had lxml so I don't think it is hiding somewhere. The pip install lists 126 dependencies, but there are only 125 in the file. I have also tried making a new environment with a fresh pull in case there was just something weird in that environment. I have also tried installing lxml on it's own and it installs fine, but installing the requirements or pip files after the install will still fail. This is the only install that is failing and no one else here knows python or how to work with this 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:

my requirements.txt file:

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

and my pip file:

[[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"

edit: here is the full tree:

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

So lxml shows there, but where is it coming from if it is not in any of the files and it is not a dependency of a dependency? I ran pipenv uninstall lxml and got the message "No package lxml to remove from Pipfile." and rechecked the tree and it is still there.

also ran: sudo apt-get --purge remove lxml Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package lxml

Edit: It looks like lxml is added to the pipfile.lock even though it isn't in the pipfile. So that is neat. I removed from the lock file and everything worked, but it would still be nice to know why it was happening.

Most probably the additional ones are transitive dependencies of some dependency specified in your requirements.txt

You can check those by using 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM