Comments (8)
No need for this. Replit just failed to guess the package.
To get around this, add #upm package(package-name)
at the end of your import statement
Ex.
import discord #upm package(discord.py)
For more information check the docs
from upm.
this shouldn't be needed here, it should just use the right library.
from upm.
This is not a scalable way to install Python packages, this should be turned off if packaging metadata is available (and should create that packaging metadata on first run, therefore switching itself off). I.e. the correct thing to do is to defer to pyproject.toml dependencies, and not haphazardly guess from import statements. I keep checking back to find it not fixed, Iād love to try Replit but this is a show stopper for me.
Iād really like to see this prioritised and thought I should comment rather than just intermittently checking for progress.
from upm.
This dovetails with some of the work we've been doing recently to improve the dependencies search pane, I'll see what can be done to improve this. Thanks for your patience, all, agreed that this should definitely not be up to the user to inform the tool to behave correctly.
from upm.
@lmmx Sorry for closing this issue without comment, there were a few different threads here that I was trying to address, it looks like I missed the main one.
Is there a way to turn off upm guess from running automatically when I run my repl?
Yes. Add the following line in the root section of your .replit
file (up top, at the same level as run
):
disableGuessImports = true
This will disable upm guessing entirely. This configuration option is not publicly documented, but there is discussion on Ask, which suggests the omission of that config option in our docs should be addressed.
More broadly, work on improving the guesser has continued in #15. Hopefully this resolves the issue, and again I do apologize for not communicating more around how/why this issue was closed.
from upm.
Oh thank you for documenting here! Sorry I thought it was just being swept under the rug lol, love to see it! Congrats on solving at long last š
from upm.
I have the same problem with the Discord API wrapper.
The code for importing the package is import discord
, so UPM wrongly guesses that the package is called discord
and adds it with poetry add discord
.
(According to https://pypi.org/project/discord/ that package should not be used, the correct package is discord.py
).
Anyways, my problem is that I need to use the master branch of that package's repo, so I added the package manually to the toml file:
[tool.poetry.dependencies]
python = "^3.8"
"discord.py" = { git = "https://github.com/Rapptz/discord.py.git", branch = "master" }
But UPM adds discord
again even if discord.py
is already imported.
So, in the end, my toml file ends up looking like this...
[tool.poetry.dependencies]
python = "^3.8"
"discord.py" = { git = "https://github.com/Rapptz/discord.py.git", branch = "master" }
discord = "^1.7.3"
...with two different versions of the same package imported twice. Which is not great.
Turning UPM off or stopping it would be a good solution.
from upm.
Er... I was using this issue to track whether this bug was resolved or not. It just got closed after a list of manual replacements has been added to in #191 ("guess package suggestions"). I don't think this is solving the problem
from upm.
Related Issues (20)
- Add support for Nuget HOT 2
- Can't handle packages for nodejs with alias HOT 1
- Increase verbosity in CMD outputs
- How to handle special dependencies like development or extra HOT 2
- support for poetry being installed via package manager HOT 2
- Add support for Golang HOT 1
- Repl unable to wake up HOT 3
- Add support for Nix HOT 1
- PNPM Support? HOT 8
- https://github.com/termux/termux-boot/commit/01b248629a7146abd91e787923f1ff3fefde1335
- [email protected]
- Can't build golang package HOT 1
- Bundle install is throwing error in case of ruby! HOT 1
- Provide info as to why different providers are not available
- Offer a one-liner installation
- Switch to statically analyzed Ruby Guess
- Support for pixi as a package manager
- Add support for rye/ uv
- Out of Date Install Instructions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from upm.