Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 5962

Namespace WebKit2 not available in Anaconda base Environment

$
0
0

Running this code out of Conda Environment runs smoothly as expected. While running inside Conda environment, I'm getting WebKit2 not found error.How can I install WebKit2 inside Conda Environment.

My Code:

import pandas as pdimport requestsimport numpy as npfrom lightweight_charts import JupyterChart,Chartimport timeimport asyncioimport nest_asynciofrom datetime import datetimenest_asyncio.apply()df=pd.read_csv('BAJAJFINSERV_2024-01-19_2024-04-18_1_minute.csv')df.columns=['time', 'open', 'high', 'low', 'close', 'volume']df['time']=pd.to_datetime(df['time']+19800,unit='s')print('chart')chart = Chart()chart.set(df.iloc[:150])chart.show()for i,series in df.iloc[150:400].iterrows():    chart.update(series)print('chart done')chart.exit()

(base) eryan@eyan:~/Desktop/fyers V3$ python candles.pychartchart[pywebview] GTK cannot be loadedTraceback (most recent call last):File "/home/eryan/anaconda3/lib/python3.11/site-packages/webview/platforms/gtk.py", line 27, in gi.require_version('WebKit2', '4.1')File "/home/eryan/anaconda3/lib/python3.11/site-packages/gi/init.py", line 126, in require_versionraise ValueError('Namespace %s not available' % namespace)ValueError: Namespace WebKit2 not available

During handling of the above exception, another exception occurred:

Traceback (most recent call last):File "/home/eryan/anaconda3/lib/python3.11/site-packages/webview/guilib.py", line 37, in import_gtkimport webview.platforms.gtk as guilibFile "/home/eryan/anaconda3/lib/python3.11/site-packages/webview/platforms/gtk.py", line 31, in gi.require_version('WebKit2', '4.0')File "/home/eryan/anaconda3/lib/python3.11/site-packages/gi/init.py", line 126, in require_versionraise ValueError('Namespace %s not available' % namespace)ValueError: Namespace WebKit2 not availableWarning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.


Viewing all articles
Browse latest Browse all 5962

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>