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

cannot import umap on my MacBook Pro M1 laptop #1159

Open
powerhorse1986 opened this issue Nov 11, 2024 · 0 comments
Open

cannot import umap on my MacBook Pro M1 laptop #1159

powerhorse1986 opened this issue Nov 11, 2024 · 0 comments

Comments

@powerhorse1986
Copy link

Hi,

I was working with a python script, and I encountered an import error shown as the following:


ImportError Traceback (most recent call last)
Cell In[6], line 3
1 import openai
2 import pandas as pd
----> 3 from umap import umap_ as UMAP
4 from hdbscan import HDBSCAN
5 from bertopic.representation import OpenAI

File ~/anaconda3/envs/bertopic/lib/python3.9/site-packages/umap/init.py:2
1 from warnings import warn, catch_warnings, simplefilter
----> 2 from .umap_ import UMAP
4 try:
5 with catch_warnings():

File ~/anaconda3/envs/bertopic/lib/python3.9/site-packages/umap/umap_.py:10
7 from warnings import warn
8 import time
---> 10 from scipy.optimize import curve_fit
11 from sklearn.base import BaseEstimator
12 from sklearn.utils import check_random_state, check_array

File ~/anaconda3/envs/bertopic/lib/python3.9/site-packages/scipy/optimize/init.py:400
1 """
2 =====================================================
3 Optimization and root finding (:mod:scipy.optimize)
(...)
397 :mod:Additional information on the nonlinear solvers <scipy.optimize.nonlin>
398 """
--> 400 from .optimize import *
401 from ._minimize import *
402 from ._root import *

File ~/anaconda3/envs/bertopic/lib/python3.9/site-packages/scipy/optimize/optimize.py:36
32 import numpy as np
33 from .linesearch import (line_search_wolfe1, line_search_wolfe2,
34 line_search_wolfe2 as line_search,
35 LineSearchWarning)
---> 36 from ._numdiff import approx_derivative
37 from scipy._lib._util import getfullargspec_no_self as _getfullargspec
38 from scipy._lib._util import MapWrapper

File ~/anaconda3/envs/bertopic/lib/python3.9/site-packages/scipy/optimize/_numdiff.py:6
3 import numpy as np
4 from numpy.linalg import norm
----> 6 from scipy.sparse.linalg import LinearOperator
7 from ..sparse import issparse, csc_matrix, csr_matrix, coo_matrix, find
8 from ._group_columns import group_dense, group_sparse

File ~/anaconda3/envs/bertopic/lib/python3.9/site-packages/scipy/sparse/linalg/init.py:111
1 """
2 Sparse linear algebra (:mod:scipy.sparse.linalg)
3 ==================================================
(...)
108
109 """
--> 111 from .isolve import *
112 from .dsolve import *
113 from .interface import *

File ~/anaconda3/envs/bertopic/lib/python3.9/site-packages/scipy/sparse/linalg/isolve/init.py:4
1 "Iterative Solvers for Sparse Linear Systems"
3 #from info import doc
----> 4 from .iterative import *
5 from .minres import minres
6 from .lgmres import lgmres

File ~/anaconda3/envs/bertopic/lib/python3.9/site-packages/scipy/sparse/linalg/isolve/iterative.py:8
5 import warnings
6 import numpy as np
----> 8 from . import _iterative
10 from scipy.sparse.linalg.interface import LinearOperator
11 from .utils import make_system

ImportError: dlopen(/Users/lima/anaconda3/envs/bertopic/lib/python3.9/site-packages/scipy/sparse/linalg/isolve/_iterative.cpython-39-darwin.so, 0x0002): Library not loaded: @rpath/liblapack.3.dylib
Referenced from: /Users/lima/anaconda3/envs/bertopic/lib/python3.9/site-packages/scipy/sparse/linalg/isolve/_iterative.cpython-39-darwin.so
Reason: tried: '/Users/lima/anaconda3/envs/bertopic/lib/python3.9/site-packages/scipy/sparse/linalg/isolve/../../../../../../liblapack.3.dylib' (no such file), '/Users/lima/anaconda3/envs/bertopic/lib/python3.9/site-packages/scipy/sparse/linalg/isolve/../../../../../../liblapack.3.dylib' (no such file), '/Users/lima/anaconda3/envs/bertopic/bin/../lib/liblapack.3.dylib' (no such file), '/Users/lima/anaconda3/envs/bertopic/bin/../lib/liblapack.3.dylib' (no such file), '/usr/local/lib/liblapack.3.dylib' (no such file), '/usr/lib/liblapack.3.dylib' (no such file, not in dyld cache)

May I know how to fix this problem?

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant