#๐ pip does not work on ubuntu VM
87 messages ยท Page 1 of 1 (latest)
@nimble rover
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.
try with --user
or create a virtualenv
can you be any less specific than "doesn't work"
how about pasting the output
whatever works
put --user before whatever you're trying to install
and you probably wanted -r requirements.txt
ok, a virtualenv it is then
I think on ubuntu you'll need python3-venv or similar package installed first
it will probably tell you if you try python3 -m venv virtualenv
then activate it: source virtualenv/bin/activate
then pip install -r requirements.txt
my guess: your requirements specify a very old version of something
can you paste that file?
---> as text, not a screenshot <---
this importerror is from pip though
what version of Ubuntu?
distutils wasn't removed from Python until 3.13 though, so I wonder what's going on
or was it already removed in 3.12
oh right, it was
would you mind running this (while in an active virtualenv): https://bootstrap.pypa.io/get-pip.py
well I can get past the problem, but it then fails with another problem. In the active virtualenv, I did pip install setuptools, and then retried pip install -r requirements.txt; now it dies with some other error
can you verify the pip version with pip --version ?
Possibly you don't have python3-venv
they are in a virtualenv created after installing just that
@nimble rover ok, try again now please
with installing the requirements
wtf...
just to be sure can you pastebin it, yes?
Can you show the command you ran and the full output, not just the stack trace
maybe an old setuptools is the issue here
pip freeze | grep setuptools - what does this give you?
where is that setuptools coming from then I wonder
No in the paste
?
There should be input and output above this https://paste.pythondiscord.com/NNJA#1L1-L1
but if it was it should be visible in pip freeze
and the virtualenv would be isolated from the system
It's coming from pip-build-env-v4sfctll
and what is that
So some package is asking for an old setuptools?
that was my theory too
@nimble rover could you try starting to install the requirements from your list one by one?
so we can pinpoint the culprit
We need the full input and output from your terminal session
wait, some requirements did install? I don't think you ever mentioned that
I was under the impression that nothing worked
I suspect it's been censored from the terminal output
Please post the full uncensored input and output
no, only the traceback was in the pastebin
Please select all the terminal session, from the prompt that you ran to the next prompt asking for another command and paste that
distutils is not installable, and not on your requirements list either
why?
where is it trying to install distutils?
I only see an import failure
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
that version of numpy was released in april 2023
could be the reason it's failing
installing setuptools might help
because such an old version of numpy does not have wheels for python 3.12
so it has to use setuptools to build the project
python 3.11 was the last version with wheels for numpy 1.24.3
try installing setuptools, then try installing numpy again
It looks like you're installing a version of numpy without wheels for your platform
yeah I said that already
And that version of numpy pinned setuptools
Because they took a long time to migrate to the new distutils way of being
if numpy pins setuptools to a specific version then you just can't install this on python 3.12
you need either a newer numpy or an older Python
where are your requirements coming from anyway
Also why are you installing async_generator it's truly ancient
I'm betting this is coming from someone else's project
!rules tos
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
yet another project that doesn't know how to do packaging
Google does not allow scraping
So you won't get help with it on this server
Also don't trust any code that has spaces in the filenames
The rule isn't about good or bad
It's about violating tos
You can try complaining about it in #community-meta
You should be up front about where the code you're trying to run is. Post the repo URL in your initial question
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, 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.