Skip to content

Instantly share code, notes, and snippets.

@Janderson
Last active May 6, 2022 00:41
Show Gist options
  • Select an option

  • Save Janderson/43e796a82920518e5dec87af8b2f099b to your computer and use it in GitHub Desktop.

Select an option

Save Janderson/43e796a82920518e5dec87af8b2f099b to your computer and use it in GitHub Desktop.
Treino - Python Fundamentos - Gerenciador Pacotes - PIP

Treino do gerenciador de pacotes com python PIP

Obs: (lembre do Chaves pipipipipipi) 😢 Abra um terminal do seu computador. cmd no Windows, terminal no linux.

Passo #1 - instalar o um pacote simples

  1. execute no terminal do computador

pip install requests

  1. Abra o python

import requests r = requests.get("https://www.abibliadigital.com.br/api/verses/nvi/sl/23") print(r.json()) texto_primeiro_verso = r.json().get("verses")[0]['text'] print(texto_primeiro_verso)

Passo #2 - baixar e instalar o arquivo dependencias.requirements.txt

  1. baixar: https://gist.github.com/Janderson/43e796a82920518e5dec87af8b2f099b#file-dependencias-requirements-txt
  2. executar o comando

pip install -r dependencias.requirements.txt

Passo #3 - busque um pacote e instale um pacote usando o iste pypi org

  1. abra o python

python

  1. execute o import pendulum (sem ter instalado o pacote)

  2. saia do python

no site https://pypi.org/project/pip/ chamado pendulum

ir além: https://docs.python.org/pt-br/3/tutorial/venv.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment