Skip to content
Sign upLog in
← Back to Community

Importing Error

Profile icon
AnthonyFerr

When importing the pycountry module, something prevents it. Usually on local environments, I can solve this by doing a manual pip install. For some reason that isn't working here. Is it that repl.it does not support pip install, or is there a dependency I need to import?

Voters
Profile icon
HaydenMisiura
Profile icon
AnthonyFerr
Comments
hotnewtop
Profile icon
RYANTADIPARTHI

try pip install pycountry. If that doesn't work, it's probably not available on repl.it yet.

Profile icon
InvisibleOne

go to the shell tab in the console and type pip install pycountry
Or if that doesn't work, do this:

import os os.system('pip install pycountry')
Profile icon
IntellectualGuy

Go to the left part of your repl where you see packages, search pycountry, click on it and then press the plus sign, if you're still having trouble, just ping me and add me to the repl. Or report to bugs. Also repl does support pip install, but you have to go to the shell.

Profile icon
AnthonyFerr

@IntellectualGuy
yeah i was going to the shell

Profile icon
IntellectualGuy

@AnthonyFerr
Does it work?

Profile icon
AnthonyFerr

@IntellectualGuy
The shell wasn't working, someone suggested importing with os but that doesn't work either. I'm just gonna check out the repository and see what I need - It might have other resources for accessing ISO stuff

Profile icon
IntellectualGuy

@AnthonyFerr
report to bugs, it's probably a bug.