#๐Ÿ”’ PIP INSTALLATION

264 messages ยท Page 1 of 1 (latest)

tired blazeBOT
#

@lilac magnet

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

odd tapir
#

did you try the pip command?

lilac magnet
#

yes

#

already satisfied

#

that's what i get

odd tapir
#

how are you running the python file?

lilac magnet
#

in VSS

odd tapir
#

vss?

lilac magnet
#

sorry VSC

odd tapir
#

you need to check what interpreter it is using

#

hit ctrl+shift+p and type interpreter

#

should be something like select interpreter

#

just check what the python version is labelled as

lilac magnet
#

okay just a sec

#

this might help?

#

i also deleted python 3.10 to put 3.13 (new version) and idk really anymore

odd tapir
#

type py -0 in terminal

#

deleted or uninstalled ๐Ÿค”

#

i still think you have two version installed

#

you need to make sure that pip installs to the correct interpreter. The one you are using to run your code

lilac magnet
#

uninstalled

odd tapir
#

do py -m pip install ...

lilac magnet
#

i clicked on py -0 and gent venv and conda

odd tapir
#

send a screenshot

lilac magnet
lilac magnet
odd tapir
lilac magnet
odd tapir
lilac magnet
#

-V:3.13 * Python 3.13 (64-bit)

odd tapir
#

okay good so you only have the one

#

you need to switch to the venv interpreter in vsc

lilac magnet
#

thank god

odd tapir
#

then activate the venv in terminal

#

then execute pip command

#

ctrl shift p and type interpreter and send screenshot

lilac magnet
#

can you might be able to help me with this? first time doing it

odd tapir
lilac magnet
#

here ๐Ÿ™‚

odd tapir
#

Are you sure you have a venv

lilac magnet
#

yes

#

look

odd tapir
#

is that in your project folder

lilac magnet
#

yes

odd tapir
#

select the second option "enter interpreter path"

#

then you need to go to the venv folder and look for python.exe

#

...venv/scripts/python.exe

lilac magnet
odd tapir
#

yes

#

but you dont have to type it

#

you can browse to it

#

hit "find"

lilac magnet
#

and then just select venv file right?

odd tapir
#

you need to select python.exe

#

inside of venv/scripts

lilac magnet
#

hm now it's get bit tricky

#

okay i think i found python.exe

odd tapir
#

got it?

lilac magnet
#

yes i found python.exe

odd tapir
#

did you select it

lilac magnet
#

yes

odd tapir
#

okay now we install into the venv

#

you need to activate it

#

you have to run a script

lilac magnet
#

i ran it and still got the same error...

#

my code i ran it

odd tapir
#

okay thats fine

#

actually lets check something first

#

go into the venv folder

lilac magnet
#

but i got this

odd tapir
#

okay thats fine

lilac magnet
#

okay im in venv folder

odd tapir
#

go into venv folder. Into Lib > site packages

#

what's in there?

#

send screenie

#

okay intersting

#

the library is in there

#

instagrapi or whatever

lilac magnet
#

yes

odd tapir
#

the plot thickens

#

delete the two instagrapi folders from there

#

and pip install it again

lilac magnet
#

these?

odd tapir
#

yes

odd tapir
#

and if still nothing then we will try to activate the venv and installing again

#

py -m pip install ...
and pip install ...

try both of these

lilac magnet
#

okay so firstly use python from and then pip install instagrapi?

odd tapir
#

yes

lilac magnet
#

it's perfectly fine to run pip install in site-packages folder?

odd tapir
#

that menu only selects which interpreter vsc uses to run the code, and not actually which interpreter installed libraries are sent to

#

yes

#

it doesn't matter where pip commands are run from

#

because every pip always installs to its own libraries stash

#

that's why you have to use the correct pip

#

which is the problem here I assume

#

we have to activate the venv's pip, and not use the global interpreter one

lilac magnet
#

okay i installed it

#

pip install

#

now what

odd tapir
#

run the code

lilac magnet
#

CRITICAL ERROR: 'instagrapi' library not found. The core functionality will not work.
Please install it: pip install instagrapi

#

๐Ÿ˜ฆ

odd tapir
#

doo

#

pip -V

lilac magnet
#

in cmd?

odd tapir
#

yes

tired blazeBOT
odd tapir
#

uh

lilac magnet
#

you are my last hope ๐Ÿ™‚

odd tapir
#

you just typed pip

#

pip -V

#

capital v

#

okay okay okay

#

do this

#

go to the folder where your venv is

#

go to scripts folder

#

venv/scripts

#

right click and hit "open in terminal"

lilac magnet
#

just right click on scripts folder and open in terminal?

odd tapir
#

inside of the folder

#

go inside of scripts

#

and right click anywhere inside of it

lilac magnet
#

okay did it

odd tapir
#

now run the file called activate.bat

#

should just be able to type activate.bat and hit enter

lilac magnet
#

activate.bat : The term 'activate.bat' 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

  • activate.bat
  •   + CategoryInfo          : ObjectNotFound: (activate.bat:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    
    

Suggestion [3,General]: The command activate.bat was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\activate.bat". See "get-help about_Command_Precedence" for more details.

odd tapir
#

oh do um

#

.\activate.bat

#

maybe

#

or ".\activate.bat"

lilac magnet
#

.\activate.bat this worked

#

it

odd tapir
#

okay now

lilac magnet
#

put PS before

odd tapir
#

fine

lilac magnet
#

what now

odd tapir
#

lets just try and run the code

#

from terminal

#

type cd ..

#

and cd .. again

#

then py your_app_name.py

lilac magnet
#

i wrote cd (my file) now i can simply try run .py

#

?

odd tapir
#

send screenshot

odd tapir
lilac magnet
#

aw shit

odd tapir
#

oh okay that works too

lilac magnet
#

okay

#

oh okay

#

perfectly

odd tapir
#

no thats fine

odd tapir
lilac magnet
#

CRITICAL ERROR: PySide6 library not found. Please install it (e.g., pip install PySide6).

#

always something

odd tapir
#

actually go back to the scripts folder

#

cd venv/Scripts

#

& '.\activate' and type this

#

it should come up with (venv) on the very left

#

i think the bat doesn't work for this. Theres a few activate scripts in there. I think you just have to use the normal one

lilac magnet
#

ughh can't get venv

odd tapir
#

hm?

lilac magnet
#

i went to script file open in terminal

#

copied cd venv/Scripts

#

and i get erros

#

errors

odd tapir
#

what error

#

you don't need to cd into scripts because you're already in that folder

lilac magnet
#

okay btu when i put . activeate

#

.\activate.bat

#

okay this work

odd tapir
#

no

#

type this exactly
& '.\activate'

#

Activate.ps1 cannot be loaded because running scripts is disabled on this system

#

okay one more command

#

just 1 sec

lilac magnet
#

no worries take your time

odd tapir
#

you need to open another terminal window

#

but you need to do it as administrator

#

see in bottom right run as admin

#

then enter Set-ExecutionPolicy RemoteSigned

#

then you need to close both terminal windows. And go back to the scripts folder and try that again

lilac magnet
#

doesnt need to be in any file to put Set-ExecutionPolicy RemoteSigned ?

odd tapir
#

anywhere

lilac magnet
#

'Set-ExecutionPolicy' is not recognized as an internal or external command,
operable program or batch file.

odd tapir
#

oh sorry it needs to be powershell not cmd

#

run as admin

#

Y

lilac magnet
#

okay i did it

lilac magnet
#

it workedd

#

i'm in venv

odd tapir
#

okay now go back and try to run the py file

#

from terminal

lilac magnet
#

i can close cmd in scripts file?

odd tapir
#

well

#

you have to do cd <your project folder>

lilac magnet
#

oh okay my bad

lilac magnet
odd tapir
#

yes

#

but you have to make sure you're in the correct folder

#

you can't do that command from scripts folder

lilac magnet
#

okay got it so basically where my code is

odd tapir
#

yes

lilac magnet
#

CRITICAL ERROR: 'instagrapi' library not found. The core functionality will not work.
Please install it: pip install instagrapi

#

still

odd tapir
#

hm

lilac magnet
#

simply dont get it really...

odd tapir
#

actually try pip install it now that venv is activated

lilac magnet
#

pip instal insta...?

odd tapir
#

ye

#

do you still have that green venv text on the left?

lilac magnet
#

yes

#

and i installed

#

should i run it again?

odd tapir
#

yes

lilac magnet
#

CRITICAL ERROR: 'instagrapi' library not found. The core functionality will not work.
Please install it: pip install instagrapi

odd tapir
#

how are you running it?

#

from terminal right?

lilac magnet
#

yes on windows powershell

#

in scripts then cd my file

odd tapir
#

and the venv is activated?

lilac magnet
#

where is saved

#

yes venv is green

#

wait let me send a sc

odd tapir
#

okay

#

lets do something

#

go back to scripts folder

#

i think it should be python.exe

#

and then you have to add the path to your py file

#

so for example

#

.\python.exe ..\..\my_file.py

#

type the .. literally

#

.. just means "go back a folder"

lilac magnet
#

still need to be in venv?

odd tapir
#

it doesnt matter

lilac magnet
#

CRITICAL ERROR: 'instagrapi' library not found. The core functionality will not work.
Please install it: pip install instagrapi

#

.\python.exe ....\main_gui.py

#

this what i put it

odd tapir
#

can you send screenshot of the terminal

#

.... isn't a thing. Only .. which means "go back 1 folder"

#

okay i'm confused and out of ideas

lilac magnet
#

same

#

been working on these whole weekend

odd tapir
#

instagram botting is against the rules by the way ,,,

lilac magnet
#

and 0 idea of what should i do

#

i know

#

but it's not for botting

#

it's my project work for school

#

@odd tapir any ideas?

lilac magnet
#

can anyone help me pls???

grim aspen
#

Read basically the whole convo to this...

lilac magnet
tired blazeBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.