Unable to install `plaid-python` with `pipenv`
pranaypaine opened this issue · 3 comments
Attention!
I'm getting the following error while I try to install plaid-python
.
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for plaid-python
error: subprocess-exited-with-error
× Running setup.py install for plaid-python did not run successfully.
│ exit code: 1
╰─> [1627 lines of output]
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/tests
copying tests/init.py -> build/lib/tests
copying tests/test_statements.py -> build/lib/tests
creating build/lib/plaid
copying plaid/init.py -> build/lib/plaid
copying plaid/rest.py -> build/lib/plaid
copying plaid/model_utils.py -> build/lib/plaid
copying plaid/exceptions.py -> build/lib/plaid
copying plaid/configuration.py -> build/lib/plaid
copying plaid/api_client.py -> build/lib/plaid
creating build/lib/tests/integration
copying tests/integration/test_transactions.py -> build/lib/tests/integration
---------------
copying plaid/model/cra_partner_insights_item.py -> build/lib/plaid/model
creating build/lib/plaid/models
copying plaid/models/init.py -> build/lib/plaid/models
creating build/lib/plaid/apis
copying plaid/apis/init.py -> build/lib/plaid/apis
running egg_info
writing plaid_python.egg-info/PKG-INFO
writing dependency_links to plaid_python.egg-info/dependency_links.txt
writing requirements to plaid_python.egg-info/requires.txt
writing top-level names to plaid_python.egg-info/top_level.txt
reading manifest file 'plaid_python.egg-info/SOURCES.txt'
writing manifest file 'plaid_python.egg-info/SOURCES.txt'
warning: build_py: byte-compiling is disabled, skipping.
running install_lib
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-rf2pmi_e/plaid-python_999cf00d70454c58bef10e75612ff575/setup.py", line 12, in <module>
setup(
File "/home/pranay/.local/share/virtualenvs/accounts-kPU23XSo/lib/python3.11/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pranay/anaconda3/lib/python3.11/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/pranay/anaconda3/lib/python3.11/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/pranay/anaconda3/lib/python3.11/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/pranay/.local/share/virtualenvs/accounts-kPU23XSo/lib/python3.11/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/pranay/anaconda3/lib/python3.11/distutils/command/install.py", line 580, in run
self.run_command(cmd_name)
File "/home/pranay/anaconda3/lib/python3.11/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/pranay/anaconda3/lib/python3.11/distutils/dist.py", line 984, in run_command
cmd_obj.ensure_finalized()
File "/home/pranay/anaconda3/lib/python3.11/distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/home/pranay/.local/share/virtualenvs/accounts-kPU23XSo/lib/python3.11/site-packages/setuptools/command/install_lib.py", line 17, in finalize_options
self.set_undefined_options('install',('install_layout','install_layout'))
File "/home/pranay/anaconda3/lib/python3.11/distutils/cmd.py", line 290, in set_undefined_options
setattr(self, dst_option, getattr(src_cmd_obj, src_option))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pranay/anaconda3/lib/python3.11/distutils/cmd.py", line 103, in __getattr__
raise AttributeError(attr)
AttributeError: install_layout. Did you mean: 'install_platlib'?
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> plaid-python
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
[0m
✘ Installation Failed
My Pipfile looks something like this.
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
fastapi = "*"
uvicorn = {extras = ["standard"], version = "*"}
boto3 = "*"
requests = "*"
sqlalchemy = "*"
alembic = "*"
mysql-connector-python = "*"
python-jose = {extras = ["cryptography"], version = "*"}
passlib = {extras = ["bcrypt"], version = "*"}
python-multipart = "*"
python-dotenv = "*"
gunicorn = "*"
pillow = "*"
cryptography = "*"
plaid-python = "*"
[dev-packages]
[requires]
python_version = "3.11"
This appears to be an issue with the configuration of pip (and specifically setuptools) on your python virtual environment and not specifically or directly related to the plaid-python library. See related topics, which have some troubleshooting suggestions:
https://stackoverflow.com/questions/36296134/attributeerror-install-layout-when-attempting-to-install-a-package-in-a-virtual
https://stackoverflow.com/questions/63818993/pipenv-fails-when-installing-packages-for-python-3-6
https://meejah.ca/blog/pip-install-layout
torproject/sbws#203