The Python 2.7 tools were already installed:
Code: Select all
$ sudo apt install python-virtualenv python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-virtualenv is already the newest version (15.1.0+ds-1.1).
python-pip is already the newest version (9.0.1-2.3~ubuntu1.18.04.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
The creation of the virtual environment proceeded smoothly, but in ubuntu it is virtualenv not virtualenv2:
Code: Select all
$ virtualenv --system-site-packages ~/.local/deluge1
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/bvargo/.local/deluge1/bin/python2
Also creating executable in /home/bvargo/.local/deluge1/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
I'm assuming that the virtual environment only needs to be created once? Is there any way to copy my old config files over to the new VE or is that moot because most of the settings I would care about are server-side anyway?
I realized after I tried it on the machine with the old Deluge that ~/.local/deluge1/bin/pip2 install git+git://deluge-torrent.org/deluge.git@1.3-stable installs the old Deluge...no help there. So at some point, I would really like to know if I can install Deluge 2 into a Python 3 virtual environment...as an intermediate step prior to upgrading my deluge-gtk and then running the old deluge-gtk in the VE. I poked around on github a bit but it wasn't readily apparent to me.
Code: Select all
$ ~/.local/deluge1/bin/pip2 install git+git://deluge-torrent.org/deluge.git@1.3-stable
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting git+git://deluge-torrent.org/deluge.git@1.3-stable
Cloning git://deluge-torrent.org/deluge.git (to revision 1.3-stable) to /tmp/pip-req-build-g7ezVt
Running command git clone -q git://deluge-torrent.org/deluge.git /tmp/pip-req-build-g7ezVt
Running command git checkout -b 1.3-stable --track origin/1.3-stable
Switched to a new branch '1.3-stable'
Branch '1.3-stable' set up to track remote branch '1.3-stable' from 'origin'.
Building wheels for collected packages: deluge
Building wheel for deluge (setup.py) ... done
Created wheel for deluge: filename=deluge-1.3.15.dev0-cp27-none-any.whl size=3594357 sha256=8d9363dead66604f7e8629a47197185018b76d79e37ecd90a562dabe7f7aa8d5
Stored in directory: /tmp/pip-ephem-wheel-cache-fNIpe3/wheels/23/9d/b3/61a191d6c45e4feb0efdc97cd839ad8f58b1c4ab8b2d633d69
Successfully built deluge
Installing collected packages: deluge
Successfully installed deluge-1.3.15.dev0
your line: "sudo pacman -Rsn python2-{virtualenv,pip} --noconfirm" appears to be equivalent to sudo apt remove python2-virtualenv, python2-pip, however, I don't understand why this would be necessary if they weren't installed previously and in the case of having previously been installed would be contrary to what I want anyway. I omitted this.
The next line, "sudo pacman -S python2{-chardet,-xdg,-twisted,-pyopenssl} gtk2 pygtk --noconfirm" is analogous to sudo apt install, so...
[N.B. The following couple steps are really unnecessary after reading Edit 1, but for completeness sake.]
Code: Select all
$ sudo apt install python2{-chardet,-xdg,-twisted,-pyopenssl} gtk2 pygtk
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python2-chardet
E: Unable to locate package python2-xdg
E: Unable to locate package python2-twisted
E: Unable to locate package python2-pyopenssl
E: Unable to locate package gtk2
E: Unable to locate package pygtk
so let's take care of the python ones first by removing the "2" after python and removing the "py" in front of "openssl." Everything is there except python-twisted and dependencies.
Code: Select all
$ sudo apt install python{-chardet,-xdg,-twisted,-openssl}
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-chardet is already the newest version (3.0.4-1).
python-chardet set to manually installed.
python-openssl is already the newest version (17.5.0-1ubuntu1).
python-openssl set to manually installed.
python-xdg is already the newest version (0.25-4ubuntu1).
python-xdg set to manually installed.
The following additional packages will be installed:
python-attr python-automat python-click python-colorama python-constantly python-hyperlink python-incremental python-pam python-pyasn1 python-pyasn1-modules python-serial python-service-identity python-twisted-bin python-twisted-core python-zope.interface
Suggested packages:
python-attr-doc python-pam-dbg python-twisted-bin-dbg python-qt3
The following NEW packages will be installed:
python-attr python-automat python-click python-colorama python-constantly python-hyperlink python-incremental python-pam python-pyasn1 python-pyasn1-modules python-serial python-service-identity python-twisted python-twisted-bin python-twisted-core python-zope.interface
0 upgraded, 16 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,452 kB of archives.
After this operation, 16.2 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 python-attr all 17.4.0-2 [23.7 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 python-automat all 0.6.0-1 [25.1 kB]
.
.
.
Processing triggers for menu (2.1.47ubuntu2.1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Since I'm running Ubuntu under GNOME Metacity Fallback and otherwise use GTK, I doubt I need to install anything GTK2 and there's no "gtk2":
Code: Select all
$ sudo apt-cache policy gtk2 <TAB>
gtk2.0-examples gtk2-engines-aurora gtk2-engines-cleanice gtk2-engines-moblin gtk2-engines-nodoka gtk2-engines-pixbuf gtk2-engines-sugar gtk2-engines-xfce gtk2hs-buildtools
gtk2-engines gtk2-engines-blueheart gtk2-engines-equinox gtk2-engines-murrine gtk2-engines-oxygen gtk2-engines-qtcurve gtk2-engines-wonderland gtk2-ex-formfactory-perl
$ sudo apt-cache policy gtk2.0-examples
gtk2.0-examples:
Installed: (none)
Candidate: 2.24.32-1ubuntu1
Version table:
2.24.32-1ubuntu1 500
500 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
That leaves "pygtk." It looks like you suggested that the ubuntu equivalent changes the "pygtk" to "python-gtk2" and "gtk2" to "libgtk2.0-0." These are already installed (see also the N.B. above):
Code: Select all
$ sudo apt-cache policy *pygtk* *py-gtk* *python-gtk*
python-zbarpygtk:
Installed: (none)
.
. [irrelevant packages omitted]
.
python-gtk2-dev:
Installed: (none)
Candidate: 2.24.0-5.1ubuntu2
Version table:
2.24.0-5.1ubuntu2 500
500 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
500 http://us.archive.ubuntu.com/ubuntu bionic/universe i386 Packages
python-gtk2-doc:
Installed: (none)
Candidate: 2.24.0-5.1ubuntu2
Version table:
2.24.0-5.1ubuntu2 500
500 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
500 http://us.archive.ubuntu.com/ubuntu bionic/universe i386 Packages
python-gtkspell:
Installed: (none)
Candidate: (none)
Version table:
python-gtk2:
Installed: 2.24.0-5.1ubuntu2
Candidate: 2.24.0-5.1ubuntu2
Version table:
*** 2.24.0-5.1ubuntu2 500
500 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
100 /var/lib/dpkg/status
.
. [irrelevant packages omitted]
.
N: Unable to locate package *py-gtk*
N: Couldn't find any package by glob '*py-gtk*'
E: Regex compilation error - Invalid preceding regular expression
N: Couldn't find any package by regex '*py-gtk*'
$ sudo apt-cache policy libgtk2.0-0
libgtk2.0-0:
Installed: 2.24.32-1ubuntu1
Candidate: 2.24.32-1ubuntu1
Version table:
*** 2.24.32-1ubuntu1 500
500 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
100 /var/lib/dpkg/status
"ln -nsf ~/.local/deluge1/bin/deluge-gtk ~/.local/bin/deluge1" appears to create a symlink from deluge1 pointing to ~/.local/deluge1/bin/deluge-gtk (in the deluge1 virtual environment folder).
Code: Select all
$ ll ~/.local/bin/
total 52
drwxr-xr-x 2 user group 4096 Oct 26 09:50 ./
drwx------ 6 user group 4096 Oct 26 09:24 ../
-rwxrwxr-x 1 user group 210 Sep 22 10:09 beet*
lrwxrwxrwx 1 user group 42 Oct 26 09:50 deluge1 -> ~/.local/deluge1/bin/deluge-gtk*
I copied ~/.config/deluge/gtkui.conf to ~/.config/deluge1/gtkui.conf and launched it with
Code: Select all
$ deluge1 -c ~/.config/deluge1
Command 'deluge1' not found, did you mean . . .
...
$ ~/.local/bin/deluge1 -c ~/.config/deluge1
(deluge:25732): Gtk-WARNING **: 09:58:47.899: Unable to locate theme engine in module_path: "hcengine",
I don't know why ~/.local/bin should or shouldn't be in $PATH, but it wasn't... and I'm assuming that hcengine is superfluous (and I believe I was getting these same errors before the upgrade to deluge-gtk 2.0).
And with that, I was able to connect from the client that initially had deluge-gtk 2.0 installed to the server that still has deluged 1.3 running, getting me from the deluge-gtk 2.0 client to deluged 1.3 server.
So basically I think I just need to do the same thing for the Python 3.6 environment on the client with deluge-gtk 1.3. The only part I'm unclear about is how to get the deluge-gtk 2.0 client from git. After that, it looks like I just translate all the steps to Python 3.6. Since this is actually the more important client-server pair, I'll probably give that a go or upgrade that machine to deluge-gtk 2.0 and then use the virtual environment to load it.
Thanks for the help and letting me know about VE. I thought I was going to need to use a VM and that really isn't the direction I wanted to go.