coreemu / core

Common Open Research Emulator
BSD 2-Clause "Simplified" License
684 stars 165 forks source link

[BUG] existing python3 core installation detected #632

Closed TinCanTech closed 3 years ago

TinCanTech commented 3 years ago

Describe the bug An existing python3 core installation detected, please remove

To Reproduce Steps to reproduce the behavior: Uninstall/Install

Expected behavior No idea..

Desktop (please complete the following information):

Additional context FULL LOG:

root@ub20:/home/tct/core# apt remove python3-pip python3-venv
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libexpat1-dev libffi7 libicu66 libjson-c4 libpython3-dev libpython3.8-dev python3-dev python3-wheel python3.8-dev zlib1g-dev
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  python3-pip python3-venv
0 upgraded, 0 newly installed, 2 to remove and 1 not upgraded.
After this operation, 1,157 kB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 148967 files and directories currently installed.)
Removing python3-pip (20.1.1-2) ...
Removing python3-venv (3.8.6-0ubuntu1) ...
Processing triggers for man-db (2.9.3-2) ...
root@ub20:/home/tct/core# exit
exit
tct@ub20:~/core$ rm -rf ../.local
tct@ub20:~/core$ sudo make uninstall
Makefile:912: warning: ignoring prerequisites on suffix rule definition
Making uninstall in gui
make[1]: Entering directory '/home/tct/core/gui'
Making uninstall in icons
make[2]: Entering directory '/home/tct/core/gui/icons'
 ( cd '/usr/local/share/core/icons/normal' && rm -f antenna.gif ap.gif core-icon.png core-icon.xbm core-logo-275x75.gif document-properties.gif gps-diagram.xbm host.gif hub.gif lanswitch.gif mdr.gif oval.gif OVS.gif pc.gif rj45.gif router_black.gif router.gif router_green.gif router_purple.gif router_red.gif router_yellow.gif simple.xbm text.gif thumb-unknown.gif tunnel.gif wlan.gif )
 ( cd '/usr/local/share/core/icons/svg' && rm -f ap.svg cel.svg hub.svg lanswitch.svg mdr.svg otr.svg OVS.svg rj45.svg router_black.svg router_green.svg router_purple.svg router_red.svg router.svg router_yellow.svg start.svg tunnel.svg vlan.svg )
 ( cd '/usr/local/share/core/icons/tiny' && rm -f ap.gif arrow.down.gif arrow.gif arrow.up.gif blank.gif button.play.gif button.stop.gif cel.gif delete.gif document-new.gif document-properties.gif document-save.gif edit-delete.gif eraser.gif fileopen.gif folder.gif host.gif hub.gif lanswitch.gif link.gif marker.gif mdr.gif mobility.gif moboff.gif observe.gif oval.gif OVS.gif pc.gif ping.gif plot.gif rectangle.gif rj45.gif router_black.gif router.gif router_green.gif router_purple.gif router_red.gif router_yellow.gif run.gif script_pause.gif script_play.gif script_stop.gif select.gif start.gif stock_connect.gif stock_disconnect.gif stop.gif text.gif trace.gif tunnel.gif twonode.gif view-refresh.gif wlan.gif )
 ( cd '/usr/local/share/applications' && rm -f core-gui.desktop )
 ( cd '/usr/local/share/pixmaps' && rm -f core-gui.xpm )
make[2]: Leaving directory '/home/tct/core/gui/icons'
make[2]: Entering directory '/home/tct/core/gui'
 ( cd '/usr/local/bin' && rm -f core-gui )
 ( cd '/usr/local/lib/core' && rm -f annotations.tcl api.tcl canvas.tcl cfgparse.tcl core.tcl debug.tcl editor.tcl exceptions.tcl exec.tcl filemgmt.tcl gpgui.tcl graph_partitioning.tcl help.tcl initgui.tcl ipv4.tcl ipv6.tcl linkcfg.tcl mobility.tcl nodecfg.tcl nodes.tcl ns2imunes.tcl plugins.tcl services.tcl tooltips.tcl topogen.tcl traffic.tcl util.tcl version.tcl widget.tcl wlanscript.tcl wlan.tcl )
 ( cd '/usr/local/lib/core/addons' && rm -f ipsecservice.tcl )
 ( cd '/usr/local/share/core/examples/configs' && rm -f sample10-kitchen-sink.imn sample11-sdn.imn sample1-bg.gif sample1.imn sample1.scen sample2-ssh.imn sample3-bgp.imn sample4-bg.jpg sample4-nrlsmf.imn sample4.scen sample5-mgen.imn sample6-emane-rfpipe.imn sample7-emane-ieee80211abg.imn sample8-ipsec-service.imn sample9-vpn.imn )
make[2]: Leaving directory '/home/tct/core/gui'
make[1]: Leaving directory '/home/tct/core/gui'
Making uninstall in daemon
make[1]: Entering directory '/home/tct/core/daemon'
Making uninstall in proto
make[2]: Entering directory '/home/tct/core/daemon/proto'
make[2]: Nothing to be done for 'uninstall'.
make[2]: Leaving directory '/home/tct/core/daemon/proto'
make[2]: Entering directory '/home/tct/core/daemon'
make[2]: Nothing to be done for 'uninstall-am'.
make[2]: Leaving directory '/home/tct/core/daemon'
make[1]: Leaving directory '/home/tct/core/daemon'
Making uninstall in netns
make[1]: Entering directory '/home/tct/core/netns'
 ( cd '/usr/local/bin' && rm -f vnoded vcmd netns )
make[1]: Leaving directory '/home/tct/core/netns'
make[1]: Entering directory '/home/tct/core'
Makefile:912: warning: ignoring prerequisites on suffix rule definition
make[1]: Nothing to be done for 'uninstall-am'.
make[1]: Leaving directory '/home/tct/core'
tct@ub20:~/core$ make clean
Makefile:912: warning: ignoring prerequisites on suffix rule definition
Making clean in gui
make[1]: Entering directory '/home/tct/core/gui'
Making clean in icons
make[2]: Entering directory '/home/tct/core/gui/icons'
make[2]: Nothing to be done for 'clean'.
make[2]: Leaving directory '/home/tct/core/gui/icons'
make[2]: Entering directory '/home/tct/core/gui'
make[2]: Nothing to be done for 'clean-am'.
make[2]: Leaving directory '/home/tct/core/gui'
make[1]: Leaving directory '/home/tct/core/gui'
Making clean in daemon
make[1]: Entering directory '/home/tct/core/daemon'
Making clean in proto
make[2]: Entering directory '/home/tct/core/daemon/proto'
rm -f ../core/api/grpc/*_pb2*
make[2]: Leaving directory '/home/tct/core/daemon/proto'
make[2]: Entering directory '/home/tct/core/daemon'
make[2]: Nothing to be done for 'clean-am'.
make[2]: Leaving directory '/home/tct/core/daemon'
make[1]: Leaving directory '/home/tct/core/daemon'
Making clean in netns
make[1]: Entering directory '/home/tct/core/netns'
test -z "vnoded vcmd netns" || rm -f vnoded vcmd netns
rm -f *.o
make[1]: Leaving directory '/home/tct/core/netns'
make[1]: Entering directory '/home/tct/core'
Makefile:912: warning: ignoring prerequisites on suffix rule definition
rm -rf *.deb
rm -rf *.rpm
make[1]: Leaving directory '/home/tct/core'
tct@ub20:~/core$ ./bootstrap.sh clean
Cleaning up the autoconf mess...
tct@ub20:~/core$ ./install.sh -v -l
setup to install CORE using apt
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libffi7 libicu66 libjson-c4
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  python3-pip python3-venv
0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
Need to get 249 kB of archives.
After this operation, 1,157 kB of additional disk space will be used.
Get:1 http://gb.archive.ubuntu.com/ubuntu groovy/universe amd64 python3-pip all 20.1.1-2 [247 kB]
Get:2 http://gb.archive.ubuntu.com/ubuntu groovy/universe amd64 python3-venv amd64 3.8.6-0ubuntu1 [1,228 B]
Fetched 249 kB in 0s (1,297 kB/s)  
Selecting previously unselected package python3-pip.
(Reading database ... 148738 files and directories currently installed.)
Preparing to unpack .../python3-pip_20.1.1-2_all.deb ...
Unpacking python3-pip (20.1.1-2) ...
Selecting previously unselected package python3-venv.
Preparing to unpack .../python3-venv_3.8.6-0ubuntu1_amd64.deb ...
Unpacking python3-venv (3.8.6-0ubuntu1) ...
Setting up python3-venv (3.8.6-0ubuntu1) ...
Setting up python3-pip (20.1.1-2) ...
Processing triggers for man-db (2.9.3-2) ...
WARNING: Keyring is skipped due to an exception: Failed to create the collection: Prompt dismissed..
WARNING: Keyring is skipped due to an exception: Failed to create the collection: Prompt dismissed..
Collecting pipx
  WARNING: Keyring is skipped due to an exception: Failed to create the collection: Prompt dismissed..
  Using cached pipx-0.16.4-py3-none-any.whl (53 kB)
WARNING: Keyring is skipped due to an exception: Failed to create the collection: Prompt dismissed..
WARNING: Keyring is skipped due to an exception: Failed to create the collection: Prompt dismissed..
Collecting userpath>=1.6.0
  WARNING: Keyring is skipped due to an exception: Failed to create the collection: Prompt dismissed..
  Using cached userpath-1.7.0-py2.py3-none-any.whl (14 kB)
WARNING: Keyring is skipped due to an exception: Failed to create the collection: Prompt dismissed..
WARNING: Keyring is skipped due to an exception: Failed to create the collection: Prompt dismissed..
Collecting argcomplete<2.0,>=1.9.4
  WARNING: Keyring is skipped due to an exception: Failed to create the collection: Prompt dismissed..
  Using cached argcomplete-1.12.3-py2.py3-none-any.whl (38 kB)
WARNING: Keyring is skipped due to an exception: Failed to create the collection: Prompt dismissed..
WARNING: Keyring is skipped due to an exception: Failed to create the collection: Prompt dismissed..
Collecting packaging>=20.0
  WARNING: Keyring is skipped due to an exception: Failed to create the collection: Prompt dismissed..
  Using cached packaging-21.2-py3-none-any.whl (40 kB)
Requirement already satisfied: click in /usr/lib/python3/dist-packages (from userpath>=1.6.0->pipx) (7.1.2)
WARNING: Keyring is skipped due to an exception: Failed to create the collection: Prompt dismissed..
WARNING: Keyring is skipped due to an exception: Failed to create the collection: Prompt dismissed..
Collecting pyparsing<3,>=2.0.2
  WARNING: Keyring is skipped due to an exception: Failed to create the collection: Prompt dismissed..
  Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Installing collected packages: userpath, argcomplete, pyparsing, packaging, pipx
Successfully installed argcomplete-1.12.3 packaging-21.2 pipx-0.16.4 pyparsing-2.4.7 userpath-1.7.0
/home/tct/.local/bin is already in PATH.

⚠️  All pipx binary directories have been added to PATH. If you are sure you want to proceed, try again with the '--force' flag.

Otherwise pipx is ready to go! ✨ 🌟 ✨
⚠️  Note: inv was already on your PATH at /usr/local/bin/inv
⚠️  Note: invoke was already on your PATH at /usr/local/bin/invoke
  installed package invoke 1.6.0, Python 3.8.10
  These apps are now globally available
    - inv
    - invoke
done! ✨ 🌟 ✨
installing core locally: True
installing core with prefix: /usr/local
/bin/bash: python: command not found
Traceback (most recent call last):
  File "/home/tct/.local/bin/inv", line 8, in <module>
    sys.exit(program.run())
  File "/home/tct/.local/pipx/venvs/invoke/lib/python3.8/site-packages/invoke/program.py", line 384, in run
    self.execute()
  File "/home/tct/.local/pipx/venvs/invoke/lib/python3.8/site-packages/invoke/program.py", line 566, in execute
    executor.execute(*self.tasks)
  File "/home/tct/.local/pipx/venvs/invoke/lib/python3.8/site-packages/invoke/executor.py", line 129, in execute
    result = call.task(*args, **call.kwargs)
  File "/home/tct/.local/pipx/venvs/invoke/lib/python3.8/site-packages/invoke/tasks.py", line 127, in __call__
    result = self.body(*args, **kwargs)
  File "/home/tct/core/tasks.py", line 363, in install
    check_existing_core(c, hide)
  File "/home/tct/core/tasks.py", line 154, in check_existing_core
    raise SystemError("existing python3 core installation detected, please remove")
SystemError: existing python3 core installation detected, please remove
bharnden commented 3 years ago

After an initial install using ./install.sh you would then use inv uninstall and inv install to repeat steps, install.sh is meant as an initial one off. You would also need to make sure you pass the proper -l flag if used during uninstall, if you installed using it.

TinCanTech commented 3 years ago

Thanks, that was the answer I required: inv uninstall -l then inv install -l.

You can edit this to make it more useful, if you prefer.