Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: eXe should be a python3 application #95

Closed
jrfern opened this issue Nov 3, 2016 · 18 comments
Closed

FR: eXe should be a python3 application #95

jrfern opened this issue Nov 3, 2016 · 18 comments
Labels

Comments

@jrfern
Copy link
Member

jrfern commented Nov 3, 2016

Some day, near 2020, python3 will be the only python available (or the old python, and python4 the development version). We should be ready for that day. This has two aspects:

@jrfern
Copy link
Member Author

jrfern commented Apr 27, 2018

From the Ubuntu 18.04 LTS release notes:

Python 2 is no longer installed by default. Python 3 has been updated to 3.6. This is the last LTS release to include Python 2 in main.

The clock won't stop.

@ignaciogros ignaciogros removed their assignment Apr 30, 2018
@jrfern
Copy link
Member Author

jrfern commented Oct 20, 2019

What's the present situation of this issue?

@jrfern
Copy link
Member Author

jrfern commented Oct 27, 2019

Well, I will answer my own question: eXe is no longer installable in the developing Debian derivatives (Testing, Unstable). It depends on libraries that are only present in the python3 version (today python-css, python-suds - the number goes up daily). Not that you can choose, the packages are no longer present, unless you are an expert and mix Stable and Testing, for example. This is no longer a FR, but a very serious bug. Therefore I change the label form FR to P1.

@jrfern
Copy link
Member Author

jrfern commented Oct 27, 2019

@ignaciogros, should I pin this issue?

@ignaciogros ignaciogros removed their assignment Oct 29, 2019
@ignaciogros
Copy link
Collaborator

OK. That's the number one priority. We're studying different possibilities. I won't treat this as a bug, but we have to do that. It's rewriting (some parts, even from scratch). I leave it unassigned for the moment.

@ignaciogros ignaciogros pinned this issue Oct 29, 2019
@uliska
Copy link

uliska commented Mar 9, 2020

I just came across this while investigating Free alternatives to the commercial closed-source elearning applications for my music university, and it's a pity that I can't install it to give it a try on my Debian testing machine.

@ignaciogros
Copy link
Collaborator

ignaciogros commented Mar 9, 2020

I just came across this while investigating Free alternatives to the commercial closed-source elearning applications for my music university, and it's a pity that I can't install it to give it a try on my Debian testing machine.

I didn't try this, but we sent this to another user and it worked for him. I know it's not the perfect solution. It's just something to do until we solve this issue.

Debian testing has Python 2, so:

1.- Install PIP:
apt-get install python-pip

2.- Check dependencies:
dpkg-deb -I intef-exe_2.5_all.deb

3.- Install the unresolved dependencies with PIP:
python -m pip install beautifulsoup4 cssmin feedparser lxml requests-oauthlib rjsmin suds webassets zope-interface dateutils Pillow

4.- Install the package ignoring the dependencies:
dpkg -i --ignore-depends=python-zopeinterface,python-pil,python-chardet,python-lxml,python-bs4,python-suds,python-requests-oauthlib,python-dateutil,python-cssmin,python-webassets,python-feedparser,mimetex intef-exe_2.5_all.deb

5.- Launch eXe from the command line:
exe

@uliska
Copy link

uliska commented Mar 9, 2020

Thank you. I tried it, and right now I could at least start the application, which launched in the browser (which I assume is correct). I'll definitely give the tool a closer look.

One comment (for the record, if someone else with the problem sees this): in 4. I had (of course) to use sudo.

I'm OK with using such a workaround as long as the availability of workarounds is not detrimental to working on the issue. I can relate to that because I know the problem from involvement in another Open Source program.

@uliska
Copy link

uliska commented Mar 9, 2020

I must partially revoke my previous endorsement. It seems that this approach subsequently prevents the apt installation of any package that depends on any of the ignored Python packages, even if the package would actually use the Python3 versions. In order to install anything else I had to remove eXe through the invocation of sudo apt --fix-broken install, as suggested by apt.

[EDIT:]
Thinking the suggested approach was somehow permanently confusing apt's dependency handling with these packages I looked for another way to accomplish the task and found an alternative approach. This seems to have worked, I can now open eXe and install other software through apt. But I would say this is a pretty risky thing that everybody would do at their own risk. Basically I removed the dependency declarations from the .deb file itself, according to https://serverfault.com/a/383958/435996, which I modified to match the resulting filenames.

This is what I did:

  1. Download the "Debian/Ubuntu" package file from https://exelearning.net/en/descargas/

  2. Install PIP (optional, may well be present already):
    sudo apt install python-pip

  3. Check dependencies:
    dpkg-deb -I intef-exe_2.5_all.deb

  4. Install the unresolved dependencies with PIP:
    python -m pip install beautifulsoup4 cssmin feedparser lxml requests-oauthlib rjsmin suds webassets zope-interface dateutils Pillow

  5. (within the download directory of the .deb file, extract the package file:
    ar x intef-exe_2.5_all.deb

  6. Unpack control archive:
    tar xzf control.tar.gz
    creates: postinst preinst prerm md5sums control

  7. open the file control and manually remove the dependencies installed before

  8. Repack the control.tar.gz archive:
    tar --ignore-failed-read -cvzf control.tar.gz postinst preinst prerm md5sums control

  9. Repackage the .deb file (new name):
    ar rcs newpackage.deb debian-binary control.tar.gz data.tar.xz

  10. Install eXe:
    sudo dpkg -i newpackage.deb

  11. Launch eXe from the command line:
    exe

@ignaciogros
Copy link
Collaborator

Thanks for sharing that information, Urs. I hope that we'll find a solution for this soon.

@glixx
Copy link
Contributor

glixx commented Mar 31, 2020

Python 2 is EOL and was dropped from Mageia Linux with eXe. Needs to release python 3 eXe as soon as possible.

@dmsoler
Copy link

dmsoler commented May 14, 2020

Just added a pull request #423 to pkg2appimage. If it is accepted, generation of an AppImage of intef-exe will be an easy and straightforward task.

@ignaciogros
Copy link
Collaborator

Just added a pull request #423 to pkg2appimage. If it is accepted, generation of an AppImage of intef-exe will be an easy and straightforward task.

Thank you, @dmsoler!

@dmsoler
Copy link

dmsoler commented May 23, 2020

Pull request #423 to pkg2appimage was merged.

You can generate an AppImage of intef-exe simply by cloning pkg2appimage repository with 'git clone https://github.com/AppImage/pkg2appimage.git' and running:

./pkg2appimage/pkg2appimage intef-exe

Note that the recipe included in pkg2appimage uses Debian oldstable packages to increase compatibility (see this commit ).

@cyberorg
Copy link

kolibri uses some python2 in mostly python3 app, this is how they handle it by including them in the package dist folder:

pip2 install -t kolibri/dist -r "requirements.txt"
rm -rf kolibri/dist/*.dist-info  # pip installs from PyPI will complain if we have more than one dist-info directory.
rm -rf kolibri/dist/*.egg-info
rm -r kolibri/dist/man kolibri/dist/bin || true # remove the two folders introduced by pip 10
python2 build_tools/py2only.py # move `future` and `futures` packages to `kolibri/dist/py2only`

https://github.com/learningequality/kolibri/blob/develop/build_tools/py2only.py

For Ubuntu 20.04 I've hacked together additional package with python2 deps as an experiment which works fine.
https://launchpad.net/~jigish-gohil/+archive/ubuntu/education

@ignaciogros
Copy link
Collaborator

Thank you, @cyberorg!
We use SNAP for the moment. I hope that we can upgrade or renew the code so there are no more compatibility problems.

@ignaciogros
Copy link
Collaborator

There will be a new eXe which will solve all this. There's no date yet. Thank you for your ideas and contributions!

@neurofreak-alt
Copy link

Some day, near 2020, python3 will be the only python available (or the old python, and python4 the development version). We should be ready for that day. This has two aspects:

* Are the libraries we use ready for python3?

* Is our code ready?
  I keep a page and I try to be uptodate
  https://docs.google.com/document/d/1P-gru4tePvEvpVzTaDOzxYV9wIiwQqDPdtWSUsRXfFM/edit#

twisted now compatible with python3. Information should be updated.

@ignaciogros ignaciogros unpinned this issue Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants