How do I import talib library on imac M1 which is already installed? - apple-m1

After installing talib library on my imac M1 while importing talib using import function facing the following error.
Library not loaded: /usr/lib/libta_lib.0.dylib
'/usr/lib/libta_lib.0.dylib' (no such file)
Can anyone help me please

Related

In julia import Pkg failed to precompiling. Why and how to solve this problem?

I am using windows 11 OS . Julia version 1.8.1 . In this moment all type of import is not working. I tried with precomplete and its not working either
To solve everything work perfectly

from pandas_profiling import profilereport Error

I've installed the pandas_profiling package but, the system is not recognizing the package.
I'm using VS Code for the project.
Hi, I'm trying to install pandas profiling for an ML testing project I've checked multiple Question Related to it on StackOverFlow but could not find any match Or Solution.
I've checked the package and it got successfully installed on the system.
But I'm still getting the Error
FYI:
I've installed multiple packages required for the project, such as NumPy, pandas, etc., and did not face any problems.
Note: If any other info is required let me Know.
import sys
!{sys.executable} -m pip install pandas-profiling
Add the above line to the top of your file

Problems installing Torch for R for Mac arm64

I'm using the Macbook Pro with the M1 chip. I have recently installed the R for the arm64 architecture from this link (R-4.1.0-arm64.pkg) and the RStudio from the daily builds (version 1.5.194).
With this installation, I was able to install almost all libraries in R and also to connect the tensorflow from a python installation (I followed these instructions).
Now I tried to install the Torch library for R (using the command install_torch() after installing the package from CRAN) and I'm having the following error:
Error in cpp_lantern_init(install_path()) :
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/torch/deps/liblantern.dylib - dlopen(/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/torch/deps/liblantern.dylib, 10): no suitable image found. Did find:
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/torch/deps/liblantern.dylib: mach-o, but wrong architecture
Did anyone have this problem and was able to solve it?

BokehJS library missing error and no plot

I am running Anaconda 10.0 Jupyter Notebook Python 3.8, bokeh 2.3.0 on Chrome. On my other PC (should be identical setup, except this is a slightly later Anaconda version) images are fine, but on this there is no image and the Javascript console tells me:
Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing
I could not find a simple, working solution to this problem here or elsewhere on the net and I am at a total loss now.
The abbreviated code I'm running is:
import regex as rg
import pandas as pd
import numpy as np
import datashader as ds, colorcet
import holoviews as hv
from holoviews.operation.datashader import datashade
from holoviews import opts
hv.extension("bokeh")
datashade(hv.Points(df_re), cmap=colorcet.fire).relabel('Reflectances').opts(height=700, width=800)
Where is the problem and how should I fix it?
Unfortunately that didn't work for me, still the same error.
What I found interesting was that prior to installing ver. 1.0.3 of the extension, Anaconda prompt said:
(Datashader-Holoview) C:\Windows\system32>jupyter labextension list
JupyterLab v2.2.6
No installed extensions
It is as if no version of that extension did exist in the environment.
There might be a bug with the most recent pyviz jupyter labextension (1.0.4). See if it works for you after you do
jupyter labextension install #pyviz/jupyterlab_pyviz#1.0.3
This worked for me.

Unable to import google.cloud.vision via the reticulate package in R

I am using the reticulate package to import python modules into RStudio.I was able to import packages like cv2,pandas,sklearn but was unable to import the google.cloud.vision package.I have installed this package via pip and am using Anaconda 4.4.0 Python 2.7 version on ubuntu-trusty-14.04-amd64-server on AWS.Pic of the error in R-Studio Server
The Installation of the vision and the language libraries was done via
pip install --upgrade google-cloud-vision
pip install --upgrade google-cloud-language
I am also able to import these modules in the python interactive sessions without any error
>>>import google.cloud.vision
>>>import google.cloud.language
Can somebody please advise me on what I am doing wrong...
Edit 1 :I have tried using the approach that Yuan Tang had suggested.I have installed the requests and httplib2 package in the conda environment.I have also used the use_python command to point Rstudio to the correct python environment.
use_python("/home/avadhut/miniconda2/bin/python")
The cv2 package is installed in the conda environment and it is imported successfully which means RStudio is using the correct Python environment
Even after doing all this I am getting the following trace-back in the R studio console.
Error in py_module_import(module, convert = convert) :
ImportError: The requests library is not installed, please install the requests package to use the requests transport.
Detailed traceback:
File "/home/avadhut/miniconda2/lib/python2.7/site-packages/google/cloud/vision/__init__.py", line 36, in <module>
from google.cloud.vision.client import Client
File "/home/avadhut/miniconda2/lib/python2.7/site-packages/google/cloud/vision/client.py", line 20, in <module>
from google.cloud.client import ClientWithProject
File "/home/avadhut/miniconda2/lib/python2.7/site-packages/google/cloud/client.py", line 25, in <module>
import google.auth.transport.requests
File "/home/avadhut/miniconda2/lib/python2.7/site-packages/google/auth/transport/requests.py", line 30, in <module>
caught_exc,
File "/home/avadhut/miniconda2/lib/python2.7/site-packages/six.py", line 737, in raise_from
raise value
Here is the pic of my RStudio IDE with the error displayed.
!Reticulate Package Import Error
This is because the Python binary you are using inside RStudio via reticulate does not have those packages (e.g. requests, httplib2, etc) installed.
You can find out what Python reticulate is using via py_config(). You can also find the Python binary you are using on the terminal via which python.
Let's suppose the Python binary you are using on the terminal (the successful imports) is: "/Users/user1/anaconda3/bin/python". Then you use that particular Python binary for reticulate via the following:
use_python("/Users/user1/anaconda3/bin/python")
Then your imports should work as expected.

Resources