Installing a package

how can I install a package onto Replit it

I want to install the osmnx package to use for some programming

Hey @TraceyO77 welcome to Ask!

You can add a package by running this in the Shell tab:

poetry add package-name-here

Alternatively, just importing the package should have the package manager guess what packages you need for you, so you could try just importing first.

Hope this helps!

5 Likes

Go to shell and you can use:

pip install osmnx
1 Like

pip is known to be unreliable and doesn’t work very well in Replit. poetry or upm is a better tool.

1 Like

oh… i’ve been using it for two years seems quite reliable to me

Don’t get us wrong, pip is fine, it just has bugs sometimes on Replit.

3 Likes

upm is replit’s universal package manager, for all languages. It also provides package guessing. Under the hood, it uses poetry for python.
poetry provides much better dependency management than pip. Under the hood, it uses pip.
pip does not show dependencies in pyproject.toml and bugs can happen (mostly on older repls).
The Packages tool uses upm.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.