how to update python version on ubuntu 14.10

4,390

Ubuntu 14.10 comes with Python 2.7.8 (available as python, python2 and python2.7) and Python 3.4.2 (available as python3 and python3.4) installed by default.

As many programs depend on them you can't remove any of them without breaking your system.

Share:
4,390

Related videos on Youtube

Scott Myers
Author by

Scott Myers

Updated on September 18, 2022

Comments

  • Scott Myers
    Scott Myers over 1 year

    Getting the following error after upgrading to Babel 7 in my react app. Let me know if I need to include more details!

    I've tried the solution of replacing module.exports with export default but that brings other errors.

    Error:

    module.exports = {
    ^
    
    TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
    
      23 | const host = process.env.RAZZLE_HOST || `http://localhost:${port}`;
      24 | 
    > 25 | module.exports = {
      26 |   port,
      27 |   host,
      28 |   isAdminSite,
    

    config.js context:

    const host = process.env.RAZZLE_HOST || `http://localhost:${port}`;
    
    module.exports = {
      port,
      host,
      isAdminSite,
      adminSiteUrl,
      userSiteUrl,
    

    Imported like:

    import _ from 'lodash';
    import moment from 'moment-timezone';
    import splitLinks from '../helpers/split-links';
    import { host } from '../config';
    import MatchView from './match_view';```
    
    • dot
      dot over 9 years
      @Sachin Kamath - i'm getting the error "command line option --reinstall is not understood"
    • Christopher B. Adkins
      Christopher B. Adkins over 9 years
      @Sachin Kamath: There's no point in reinstalling the python package here.
    • Aritra Chakraborty
      Aritra Chakraborty almost 5 years
      How are you importing the file?
    • Scott Myers
      Scott Myers almost 5 years
      @AritraChakraborty Editted, does that provide enough context? Sorry, I'm pretty new to this all.
  • dot
    dot over 9 years
    ok so i was just launching the wrong program from the commandline...? I should do python3 is what I'm hearing. Is that correct?
  • Christopher B. Adkins
    Christopher B. Adkins over 9 years
    Yes. And for a script you use #!/usr/bin/python3 as shebang line.
  • user.dz
    user.dz about 8 years
    Welcome to Ask Ubuntu, nice to see you sharing knowledge. However, the original post asking about python3 and it already got a working answer. You instruction will update python2
  • Ida N
    Ida N over 7 years
    Note that Ubuntu 14.10 end of life was July 23, 2015 wiki.ubuntu.com/Releases
  • Scott Myers
    Scott Myers almost 5 years
    Can I not use export default with import? export alone doesn't seem to recognize the block of code correctly, and weirdly messes with the brace pairings, even though they are correct.
  • Aritra Chakraborty
    Aritra Chakraborty almost 5 years
    Yeah yeah, sure you can use export also export default. But not module.exports
  • Scott Myers
    Scott Myers almost 5 years
    After using export default, the server starts for a moment then breaks with this error: ./src/common/stores/event.js Attempted import error: 'host' is not exported from '../config'.
  • Aritra Chakraborty
    Aritra Chakraborty almost 5 years
    If you want to use export default then use import config from './config' then use config.host