ARYAN KUMAR
ARYAN KUMAR

Reputation: 1

Namespace WebKit2 not available in Anaconda base Environment

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 pd
import requests
import numpy as np
from lightweight_charts import JupyterChart,Chart
import time
import asyncio
import nest_asyncio
from datetime import datetime

nest_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.py chart chart [pywebview] GTK cannot be loaded Traceback (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_version raise 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_gtk import webview.platforms.gtk as guilib File "/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_version raise ValueError('Namespace %s not available' % namespace) ValueError: Namespace WebKit2 not available Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.

Upvotes: 0

Views: 236

Answers (0)

Related Questions