Python PIP устанавливает онлайн-репозиторий [дубликат]Python

Программы на Python
Anonymous
Python PIP устанавливает онлайн-репозиторий [дубликат]

Сообщение Anonymous »

Итак, моя проблема в том, что код VS не распознает установку PIP: ниже приведен мой репозиторий GitHub, я пытаюсь получить доступ к https://github.com/dsdanielpark/Gemini-API.git, и это мой код: р>

Код: Выделить всё

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()
ОШИБКА:
!pip: термин «!pip» не распознается как имя командлета, функции, файла сценария или исполняемой программы.
Проверьте. правильность написания имени или, если был включен путь, проверьте правильность пути и повторите попытку.

В строке:1 символ:1
  • !pip установить Gemini из OpenRouter
  • Код: Выделить всё

      + CategoryInfo          : ObjectNotFound: (!pip:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
    
    
PS C:\Users\Spare Computer\Desktop\SDDMajor> pip install git+https://github. com/dsdanielpark/Gemini-API.git
pip: термин «pip» не распознается как имя командлета, функции, файла сценария или исполняемой программы.
Проверьте написание имени, или, если путь был включен, проверьте правильность пути и повторите попытку.

В строке:1 символ:1
PS: можно ли было бы загрузить репозиторий и интегрировать его в папку моей программы?
Я попробовал:
  • убедиться, что на моем устройстве есть PIP< /li>
    вводим !pip install xyz в консоль VS Code
  • Спрашиваем моего учителя по программному обеспечению (он разглагольствовал о трехмерном мышлении и не помог)


Подробнее здесь: https://stackoverflow.com/questions/785 ... repository

Вернуться в «Python»