jankrepl / jankrepl/deepdow

Trouble with cvxpy

Open
#117 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
1.2k
Forks
170
PR merge metrics
No merged PRs in 30d

Description

I seem to have error in importing cvxpy for some reason.

I have looked for solutions, but I can't find the solution. Below is the error I got.
I am using PyCharm and my OS is Mac.

Traceback (most recent call last):
File "/Users/chriskang/Desktop/OneDrive - HKUST Connect/Pycharm/2021_Toy/DeepDow/data_prep.py", line 5, in
from deepdow.benchmarks import Benchmark, OneOverN, Random
File "/Users/chriskang/Desktop/OneDrive - HKUST Connect/Pycharm/2021_Toy/DeepDow/venv/PycharmProjects/VirtualEnvList/lib/python3.8/site-packages/deepdow/benchmarks.py", line 5, in
from cvxpylayers.torch import CvxpyLayer
File "/Users/chriskang/Desktop/OneDrive - HKUST Connect/Pycharm/2021_Toy/DeepDow/venv/PycharmProjects/VirtualEnvList/lib/python3.8/site-packages/cvxpylayers/torch/__init__.py", line 1, in
from cvxpylayers.torch.cvxpylayer import CvxpyLayer # noqa: F401
File "/Users/chriskang/Desktop/OneDrive - HKUST Connect/Pycharm/2021_Toy/DeepDow/venv/PycharmProjects/VirtualEnvList/lib/python3.8/site-packages/cvxpylayers/torch/cvxpylayer.py", line 1, in
import diffcp
File "/Users/chriskang/Desktop/OneDrive - HKUST Connect/Pycharm/2021_Toy/DeepDow/venv/PycharmProjects/VirtualEnvList/lib/python3.8/site-packages/diffcp/__init__.py", line 3, in
from diffcp.cone_program import solve_and_derivative, \
File "/Users/chriskang/Desktop/OneDrive - HKUST Connect/Pycharm/2021_Toy/DeepDow/venv/PycharmProjects/VirtualEnvList/lib/python3.8/site-packages/diffcp/cone_program.py", line 3, in
import diffcp.cones as cone_lib
File "/Users/chriskang/Desktop/OneDrive - HKUST Connect/Pycharm/2021_Toy/DeepDow/venv/PycharmProjects/VirtualEnvList/lib/python3.8/site-packages/diffcp/cones.py", line 6, in
from _diffcp import dprojection, project_exp_cone, Cone, ConeType
ImportError: dlopen(/Users/chriskang/Desktop/OneDrive - HKUST Connect/Pycharm/2021_Toy/DeepDow/venv/PycharmProjects/VirtualEnvList/lib/python3.8/site-packages/_diffcp.cpython-38-darwin.so, 2): Library not loaded: @rpath/libc++.1.dylib
Referenced from: /Users/chriskang/Desktop/OneDrive - HKUST Connect/Pycharm/2021_Toy/DeepDow/venv/PycharmProjects/VirtualEnvList/lib/python3.8/site-packages/_diffcp.cpython-38-darwin.so
Reason: image not found

Please help

Contributor guide

No contributing guide indexed for this repository

Research direction

The traceback starts at data_prep.py line 5 and passes through deepdow.benchmarks.py, cvxpylayers, and diffcp; inspect that import chain and the project's dependency setup first. Reproduce the import in the reported macOS Python environment, then consider the issue resolved when the documented project environment imports deepdow without the libc++.1.dylib error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.