So my problem is that VS code doesn’t recognise PIP install: the following is my github repo im trying to access https://github.com/dsdanielpark/Gemini-API.git and this is my code:
import csv
from https://github.com/dsdanielpark/Gemini-API.git import OpenRouter
api_key = "xyz-123"
gemma_client = OpenRouter(api_key=api_key, model="google/gemma-7b-it:free")
data = []
num = 0
import tkinter as tk
root=tk.Tk()
# setting the windows size
root.geometry("600x400")
# declaring string variable
# for storing name and password
name_var=tk.StringVar()
#passw_var=tk.StringVar()
# defining a function that will
# get the name and password and
# print them on the screen
def submit():
name=name_var.get()
num + 1
summary = gemma_client.create_chat_completion("Summarise findings of the following paper:"+name+". In the first line state whether it is an orignal work or not in the form OG:Yes or OG:Noo")
OG = summary[0:5]
data.append([num, OG, summary])
with open('data.csv', mode='w', newline='') as file:
writer = csv.writer(file)
writer.writerows(data)
name_var.set("")
root.title("Reaserchify")
label = tk.Label(root, text="Reaserchify", font=('Arial', 18))
# creating a label for
# name using widget Label
name_label = tk.Label(root, text = 'Enter URL', font=('calibre',10, 'bold'))
# creating a entry for input
# name using widget Entry
name_entry = tk.Entry(root,textvariable = name_var, font=('calibre',10,'normal'))
# creating a label for password
#passw_label = tk.Label(root, text = 'Password', font = ('calibre',10,'bold'))
# creating a entry for password
#passw_entry=tk.Entry(root, textvariable = passw_var, font = ('calibre',10,'normal'), show = '*')
# creating a button using the widget
# Button that will call the submit function
sub_btn=tk.Button(root,text = 'Submit', command = submit)
# placing the label and entry in
# the required position using grid
# method
name_label.grid(row=0,column=0)
name_entry.grid(row=0,column=1)
#passw_label.grid(row=1,column=0)
#passw_entry.grid(row=1,column=1)
sub_btn.grid(row=2,column=1)
# program display
root.mainloop()
ERROR:
!pip : The term ‘!pip’ is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
- !pip install gemini from OpenRouter
-
+ CategoryInfo : ObjectNotFound: (!pip:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
PS C:UsersSpare ComputerDesktopSDDMajor> pip install git+https://github.com/dsdanielpark/Gemini-API.git
pip : The term ‘pip’ is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
PS: would it be possible to download the repository and integrate it into my program folder?
I have tried:
- ensuring my device has PIP
- typing !pip install xyz into VS Code console
- Asking my software teacher (he went on a rant about 3 dimensional thinking and didn’t help)
Kashi Golembiewski is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1