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

poetry lock / poetry install running into issues locally #8

Closed
andrew-p-morris-er opened this issue Jan 12, 2023 · 4 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@andrew-p-morris-er
Copy link
Contributor

andrew-p-morris-er commented Jan 12, 2023

I'm trying to update virtual environments on my local machine for local development using poetry, but can't debug the following error when trying to run poetry lock / poetry install:

(probmodels-py3.10) (base) andrewmorris@Andrews-MacBook-Pro probmodels % poetry lock
Updating dependencies
Resolving dependencies... (0.3s)

HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /EntityRisk/erutils.git/info/refs?service=git-upload-pack (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)')))

Indeed the problem is specific to the github dependency, which in this case is erutils, specified in pyproject.toml as follows:

[tool.poetry.dependencies]
python = "^3.8"
scipy = "^1.9.3"
numpy = "^1.23.4"
pandas = "^1.5.1"
scikit-learn = "^1.1.3"
cmdstanpy = "^1.0.8"
arviz = "^0.14.0"
plotly = "^5.11.0"
erutils = {git = "https://github.com/EntityRisk/erutils.git", branch = "sort-categorical-scatter-points"}

Wondering if others have faced this problem or if they've found a solution. So far the basic fixes I've tried:

  • Removing the github dependencies - this works, but the dependencies are needed.
  • Pointing to main for the github dependency - this doesn't work
  • clean install of poetry - this doesn't work

It seems like others have faced similar difficulties before, but the solutions discussed in these threads did not work for me either - likely owing to their having issues that (1) were slightly different and (2) being due to use of a VPN. (2) doesn't seem to be the issue in this case, since I get this error whether I'm on or off the VPN.

Any thoughts welcome and appreciated.

@andrew-p-morris-er
Copy link
Contributor Author

Also note - this isn't urgent, as I'm not in dire need of being able to work on probmodels locally.

@jeff-m-sullivan
Copy link
Contributor

Did you use poetry add to update the TOML file? When I did so, I got a different output from you:

erutils = {git = "https://github.com/EntityRisk/erutils.git", rev = "sort-categorical-scatter-points"}

I did try with your syntax and it still seems to work.

Can you install directly via pip without going through poetry?

@andrew-p-morris-er
Copy link
Contributor Author

Thanks @jeff-m-sullivan ! I initially updated the TOML file manually, but I still get the error after re-adding erutils via poetry add.

And yes, I can install directly via pip so it appears to be specific to poetry

@andrew-p-morris-er
Copy link
Contributor Author

I did manage to sort this out, at long last. The issue was Python's ssl certificates being out of date. Resolved via this handy point-and-click solution: python-poetry/poetry#745 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants