#πŸ”’ Error updating virtual enviroment

4 messages Β· Page 1 of 1 (latest)

bold belfry
#

Hi, I'm using the service PythonAnywhere to host an small page.
My page was using an old python version and I tried to update, but it doesn't work and now everything is broken 😭.

I went to my virtual environment, and in a bash console run pip freeze > /tmp/requirements.txt, then I did rm -rf ~/.cache/.
Then run mkvirtualenv --python=python3.10 py310 and finally pip install -r /tmp/requirements.txt inside the enviroment.

And then I got the following error:

Collecting astropy==4.3.1 (from -r /tmp/requirements.txt (line 18))
  Downloading astropy-4.3.1.tar.gz (7.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.6/7.6 MB 29.9 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  Γ— Getting requirements to build wheel did not run successfully.
  β”‚ exit code: 1
  ╰─> [31 lines of output]
      Traceback (most recent call last):
        [... STACK_TRACE ...]
      ModuleNotFoundError: No module named 'setuptools.dep_util'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
Γ— Getting requirements to build wheel did not run successfully.
β”‚ exit code: 1
╰─> See above for output.

I'm not sure how to fix this. Any idea?

I tried with python -m pip install -U setuptools but did not fix it.
I also tried updating pip but that is not an option since one of my dependencies has a metadata which only works in pip < 24.1, So I have pip == 24.0.

hearty bridgeBOT
#

@bold belfry

Python help channel opened

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.

hearty bridgeBOT
#

@bold belfry

Python help channel closed

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.