You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Looking at the traceback I think this issue has to do with incorrect installation of cvxpylayers and more specifically it's dependency diffcp.
I would image that if you try to run the following import inside of Python you get the same error, right?
importdiffcp.conesascone_lib
Anyway, if that is the case, I would definitely encourage you to read through issues in the following repos. And if none of them addresses your problem you should probably create a new issue.
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
The text was updated successfully, but these errors were encountered: