Ask coding questions

← Back to all posts
installing pip
h
JackFrostYT (0)

everyday I have to install PyNaCl library is there a way to auto install PyNaCl library or just have a file that stays in replit so I don't need to install it?

Answered by LukeWright (114) [earned 5 cycles]
View Answer
Comments
hotnewtop
LukeWright (114)

you could put in your code

import os
os.system("pip install PyNaCl")

(make sure to put it at the very top so that there is no problems)

LukeWright (114)

If this helped, click the check mark next to my name! @JackFrostYT

JackFrostYT (0)

yes it did work thank you @LukeWright

JackFrostYT (0)

I thought it fixed my problem but it didn't sadly @LukeWright

LukeWright (114)

Try this:
step 1:

click on the cube in the left menu

Step 2:

search for PyNaCl

step 3:

click on PyNaCl and then click the (+) icon.

step 4:

You should be able to now just write

Import PyNaCl

and use it normally

@JackFrostYT

JackFrostYT (0)

it still dose not work i need to install python3 -m pip install -U discord.py[voice] @LukeWright

LukeWright (114)

wdym you need to install python 3? @JackFrostYT

JackFrostYT (0)

i just paste all of that in the terminal to make it work
@LukeWright

JackFrostYT (0)

and then i Import PyNaCl it says PyNaCl is not defined and i did go to packages and add it @LukeWright

LukeWright (114)

Don't just paste it into the console.
(1)

(2)

After you do this, it should output: