sudp apt update not working to load python3 module

Asked by Christopher Martineau

I am a grad student working with MCNP for my research project. I am using Ubuntu to run a Python3 automation script developed by my research partner.

However, the python3 that comes with Ubuntu does not have the modules I need to run the automation, namely numpy and matplot.

To load these, I need to load pip for python3. But Ubuntu will not allow this.

I looked for help in various website and they all say to use sudo apt update and then sudo apt install python3-pip.

However, when I use the sudo apt update command in my terminal, I get a series of errors; they are:

Hit:1 http://old-releases.ubuntu.com/ubuntu disco-security InRelease
Err:2 http://us.old-releases.ubuntu.com/ubuntu disco InRelease
  Could not resolve 'us.old-releases.ubuntu.com'
Err:3 http://us.old-releases.ubuntu.com/ubuntu disco-updates InRelease
  Could not resolve 'us.old-releases.ubuntu.com'
Err:4 http://us.old-releases.ubuntu.com/ubuntu disco-backports InRelease
  Could not resolve 'us.old-releases.ubuntu.com'
Reading package lists... Done
Building dependency tree
Reading state information... Done
192 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch http://us.old-releases.ubuntu.com/ubuntu/dists/disco/InRelease Could not resolve 'us.old-releases.ubuntu.com'
W: Failed to fetch http://us.old-releases.ubuntu.com/ubuntu/dists/disco-updates/InRelease Could not resolve 'us.old-releases.ubuntu.com'
W: Failed to fetch http://us.old-releases.ubuntu.com/ubuntu/dists/disco-backports/InRelease Could not resolve 'us.old-releases.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

Because of this, I cannot add pip, which means I cant add numpy or matplot and cannot run the program that is driving my research.

Any help on this would be greatly appreciated. I am kind of lost on this and the internet has not been helpful.

Thank you

Chris

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

Your repository settings (in the file /etc/apt/sources.list) are wrong. There is no "us.old-releases.ubuntu.com" server, it has to be either "us.archive.ubuntu.com" or "old-releases.ubuntu.com"

An important question is: Which Ubuntu release are you running? Ubuntu disco (as mentioned in the error message) is not supported any more, see https://wiki.ubuntu.com/Releases

Ubuntu 20.04 (focal) do contain python3, python3-numpy and python3-matplotlib in its standard repositories - no need for pip.

Can you help with this problem?

Provide an answer of your own, or ask Christopher Martineau for more information if necessary.

To post a message you must log in.