emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* after installing python3.6 on Ubuntu 16.04, org files open with errors
@ 2021-11-12 22:15 Uwe Brauer
  2021-11-13  2:22 ` Tim Cross
  2021-11-14 17:49 ` [downgrading to matlab 2019a and using 3.5 NOW does not work neither] (was: after installing python3.6 on Ubuntu 16.04, org files open with errors) Uwe Brauer
  0 siblings, 2 replies; 13+ messages in thread
From: Uwe Brauer @ 2021-11-12 22:15 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 542 bytes --]


Hi

I am running Ubuntu 16.04 and I installed python3.6 (which is not
officially supported for that Ubuntu version via 
https://askubuntu.com/questions/865554/how-do-i-install-python-3-6-using-apt-get

I also installed 

sudo -H python3.6 -m pip install jupyter
sudo -H python3.6 -m pip install pexpect
sudo -H python3.6 -m pip install matlab_kernel


Now however I cannot open even simple org files, I obtain errors I attach
and most of my keybinding and other things do not work.

Any help is strongly appreciated.

Regards

Uwe Brauer 



[-- Attachment #2: ob-python-bug.txt --]
[-- Type: text/plain, Size: 1259 bytes --]

Traceback (most recent call last):
  File "/home/oub/.emacs.d/elpa/ob-ipython-20180224.153/client.py", line 1, in <module>
    import jupyter_client as client
  File "/usr/local/lib/python3.6/dist-packages/jupyter_client/__init__.py", line 6, in <module>
    from .asynchronous import AsyncKernelClient  # noqa
  File "/usr/local/lib/python3.6/dist-packages/jupyter_client/asynchronous/__init__.py", line 1, in <module>
    from .client import AsyncKernelClient  # noqa
  File "/usr/local/lib/python3.6/dist-packages/jupyter_client/asynchronous/client.py", line 6, in <module>
    from jupyter_client.channels import HBChannel
  File "/usr/local/lib/python3.6/dist-packages/jupyter_client/channels.py", line 15, in <module>
    from .session import Session
  File "/usr/local/lib/python3.6/dist-packages/jupyter_client/session.py", line 52, in <module>
    from jupyter_client.jsonutil import extract_dates
  File "/usr/local/lib/python3.6/dist-packages/jupyter_client/jsonutil.py", line 15, in <module>
    from dateutil.parser import parse as _dateutil_parse  # type: ignore
  File "/usr/lib/python3/dist-packages/dateutil/parser.py", line 25, in <module>
    from six import text_type, binary_type, integer_types
ModuleNotFoundError: No module named 'six'

[-- Attachment #3: python3.6.txt --]
[-- Type: text/plain, Size: 8968 bytes --]

Debugger entered--Lisp error: (json-readtable-error 84)
  signal(json-readtable-error (84))
  json-read()
  json-read-from-string("Traceback (most recent call last):\n  File \"/usr/local/bin/jupyter-kernelspec\", line 7, in <module>\n    from jupyter_client.kernelspecapp import KernelSpecApp\n  File \"/usr/local/lib/python3.6/dist-packages/jupyter_client/__init__.py\", line 6, in <module>\n    from .asynchronous import AsyncKernelClient  # noqa\n  File \"/usr/local/lib/python3.6/dist-packages/jupyter_client/asynchronous/__init__.py\", line 1, in <module>\n    from .client import AsyncKernelClient  # noqa\n  File \"/usr/local/lib/python3.6/dist-packages/jupyter_client/asynchronous/client.py\", line 6, in <module>\n    from jupyter_client.channels import HBChannel\n  File \"/usr/local/lib/python3.6/dist-packages/jupyter_client/channels.py\", line 15, in <module>\n    from .session import Session\n  File \"/usr/local/lib/python3.6/dist-packages/jupyter_client/session.py\", line 52, in <module>\n    from jupyter_client.jsonutil import extract_dates\n  File \"/usr/local/lib/python3.6/dist-packages/jupyter_client/jsonutil.py\", line 15, in <module>\n    from dateutil.parser import parse as _dateutil_parse  # type: ignore\n  File \"/usr/lib/python3/dist-packages/dateutil/parser.py\", line 25, in <module>\n    from six import text_type, binary_type, integer_types\nModuleNotFoundError: No module named 'six'\n")
  ob-ipython--get-kernels()
  ob-ipython-auto-configure-kernels()
  run-hooks(change-major-mode-after-body-hook text-mode-hook outline-mode-hook org-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook text-mode-hook outline-mode-hook org-mode-hook))
  run-mode-hooks(org-mode-hook)
  org-mode()
  set-auto-mode-0(org-mode nil)
  set-auto-mode--apply-alist((("\\.odb\\'" . archive-mode) ("\\.oth\\'" . archive-mode) ("\\.otf\\'" . archive-mode) ("\\.oti\\'" . archive-mode) ("\\.otc\\'" . archive-mode) ("\\.wiki\\'" . wikipedia-mode) ("\\.text\\'" . markdown-mode) ("\\.tlc\\'" . tlc-mode) ("\\.m\\'" . matlab-mode) ("\\.org$" . org-mode) ("\\.odc\\'" . archive-mode) ("\\.odf\\'" . archive-mode) ("\\.odi\\'" . archive-mode) ("\\.otp\\'" . archive-mode) ("\\.odp\\'" . archive-mode) ("\\.otg\\'" . archive-mode) ("\\.odg\\'" . archive-mode) ("\\.ots\\'" . archive-mode) ("\\.ods\\'" . archive-mode) ("\\.odm\\'" . archive-mode) ("\\.ott\\'" . archive-mode) ("\\.odt\\'" . archive-mode) ("\\.fqm$" . message-mode) ("\\.alda\\'" . alda-mode) ("\\.[Cc][Ss][Vv]\\'" . csv-mode) ("\\.d[i]?\\'" . d-mode) ("\\.diffscuss\\'" . diffscuss-mode) ("\\.djvu\\'" . djvu-dummy-mode) ("[\\\\/]pentadactyl\\.\\(inbox\\|mail\\)\\.google\\..*\\.txt..." . gmail-message-mode) ("[\\\\/]itsalltext[\\\\/]\\(inbox\\|mail\\)\\.google\\..*\\.t..." . gmail-message-mode) ("[\\\\/]\\(inbox\\|mail\\)-google-com.*\\.\\(ckr\\|html?\\|t..." . gmail-message-mode) ("hg-histedit-" . hg-histedit-mode) ("\\.hgignore\\'" . hgignore-mode) ("/Mercurial\\.ini\\'" . hgrc-mode) ("/\\.hg/hgrc\\'" . hgrc-mode) ("/\\.hgrc\\'" . hgrc-mode) ("\\.lean$" . lean-mode) ("\\.ledger\\'" . ledger-mode) ("/git-rebase-todo\\'" . git-rebase-mode) ("\\.R$" . R-mode) ("\\.jl\\'" . julia-mode) ("\\.tlc$" . tlc-mode) ("\\.m$" . matlab-mode) ("\\.hva\\'" . latex-mode) ("\\.swift\\'" . swift-mode) ("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" nil epa-file) ("\\.elc\\'" . elisp-byte-code-mode) ("\\.zst\\'" nil jka-compr) ("\\.dz\\'" nil jka-compr) ("\\.xz\\'" nil jka-compr) ...) nil nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer matlab-python.org> "~/Mail/Remember/matlab-python.org" nil nil "~/ALLES/Mail/Remember/matlab-python.org" (14690076 47))
  find-file-noselect("/home/oub/Mail/Remember/matlab-python.org" nil nil nil)
  #f(compiled-function (filename &optional wildcards) "Edit file FILENAME.\nSwitch to a buffer visiting file FILENAME,\ncreating one if none already exists.\nInteractively, the default if you just type RET is the current directory,\nbut the visited file name is available through the minibuffer history:\ntype \\[next-history-element] to pull it into the minibuffer.\n\nThe first time \\[next-history-element] is used after Emacs prompts for\nthe file name, the result is affected by `file-name-at-point-functions',\nwhich by default try to guess the file name by looking at point in the\ncurrent buffer.  Customize the value of `file-name-at-point-functions'\nor set it to nil, if you want only the visited file name and the\ncurrent directory to be available on first \\[next-history-element]\nrequest.\n\nYou can visit files on remote machines by specifying something\nlike /ssh:SOME_REMOTE_MACHINE:FILE for the file name.  You can\nalso visit local files as a different user by specifying\n/sudo::FILE for the file name.\nSee the Info node `(tramp)File name Syntax' in the Tramp Info\nmanual, for more about this.\n\nInteractively, or if WILDCARDS is non-nil in a call from Lisp,\nexpand wildcards (if any) and visit multiple files.  You can\nsuppress wildcard expansion by setting `find-file-wildcards' to nil.\n\nTo visit a file without any kind of conversion and without\nautomatically choosing a major mode, use \\[find-file-literally]." (interactive #f(compiled-function () #<bytecode -0xa43fcb9897262f1>)) #<bytecode 0xb6206f70bd6defc>)("/home/oub/Mail/Remember/matlab-python.org" nil)
  ad-Advice-find-file(#f(compiled-function (filename &optional wildcards) "Edit file FILENAME.\nSwitch to a buffer visiting file FILENAME,\ncreating one if none already exists.\nInteractively, the default if you just type RET is the current directory,\nbut the visited file name is available through the minibuffer history:\ntype \\[next-history-element] to pull it into the minibuffer.\n\nThe first time \\[next-history-element] is used after Emacs prompts for\nthe file name, the result is affected by `file-name-at-point-functions',\nwhich by default try to guess the file name by looking at point in the\ncurrent buffer.  Customize the value of `file-name-at-point-functions'\nor set it to nil, if you want only the visited file name and the\ncurrent directory to be available on first \\[next-history-element]\nrequest.\n\nYou can visit files on remote machines by specifying something\nlike /ssh:SOME_REMOTE_MACHINE:FILE for the file name.  You can\nalso visit local files as a different user by specifying\n/sudo::FILE for the file name.\nSee the Info node `(tramp)File name Syntax' in the Tramp Info\nmanual, for more about this.\n\nInteractively, or if WILDCARDS is non-nil in a call from Lisp,\nexpand wildcards (if any) and visit multiple files.  You can\nsuppress wildcard expansion by setting `find-file-wildcards' to nil.\n\nTo visit a file without any kind of conversion and without\nautomatically choosing a major mode, use \\[find-file-literally]." (interactive #f(compiled-function () #<bytecode -0xa43fcb9897262f1>)) #<bytecode 0xb6206f70bd6defc>) "/home/oub/Mail/Remember/matlab-python.org")
  apply(ad-Advice-find-file #f(compiled-function (filename &optional wildcards) "Edit file FILENAME.\nSwitch to a buffer visiting file FILENAME,\ncreating one if none already exists.\nInteractively, the default if you just type RET is the current directory,\nbut the visited file name is available through the minibuffer history:\ntype \\[next-history-element] to pull it into the minibuffer.\n\nThe first time \\[next-history-element] is used after Emacs prompts for\nthe file name, the result is affected by `file-name-at-point-functions',\nwhich by default try to guess the file name by looking at point in the\ncurrent buffer.  Customize the value of `file-name-at-point-functions'\nor set it to nil, if you want only the visited file name and the\ncurrent directory to be available on first \\[next-history-element]\nrequest.\n\nYou can visit files on remote machines by specifying something\nlike /ssh:SOME_REMOTE_MACHINE:FILE for the file name.  You can\nalso visit local files as a different user by specifying\n/sudo::FILE for the file name.\nSee the Info node `(tramp)File name Syntax' in the Tramp Info\nmanual, for more about this.\n\nInteractively, or if WILDCARDS is non-nil in a call from Lisp,\nexpand wildcards (if any) and visit multiple files.  You can\nsuppress wildcard expansion by setting `find-file-wildcards' to nil.\n\nTo visit a file without any kind of conversion and without\nautomatically choosing a major mode, use \\[find-file-literally]." (interactive #f(compiled-function () #<bytecode -0xa43fcb9897262f1>)) #<bytecode 0xb6206f70bd6defc>) "/home/oub/Mail/Remember/matlab-python.org")
  find-file("/home/oub/Mail/Remember/matlab-python.org")
  dired--find-file(find-file "/home/oub/Mail/Remember/matlab-python.org")
  dired--find-possibly-alternative-file("/home/oub/Mail/Remember/matlab-python.org")
  dired-find-file()
  funcall-interactively(dired-find-file)
  call-interactively(dired-find-file nil nil)
  command-execute(dired-find-file)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: after installing python3.6 on Ubuntu 16.04, org files open with errors
  2021-11-12 22:15 after installing python3.6 on Ubuntu 16.04, org files open with errors Uwe Brauer
@ 2021-11-13  2:22 ` Tim Cross
  2021-11-13  9:59   ` Martin Schöön
                     ` (2 more replies)
  2021-11-14 17:49 ` [downgrading to matlab 2019a and using 3.5 NOW does not work neither] (was: after installing python3.6 on Ubuntu 16.04, org files open with errors) Uwe Brauer
  1 sibling, 3 replies; 13+ messages in thread
From: Tim Cross @ 2021-11-13  2:22 UTC (permalink / raw)
  To: emacs-orgmode


Uwe Brauer <oub@mat.ucm.es> writes:

> Hi
>
> I am running Ubuntu 16.04 and I installed python3.6 (which is not
> officially supported for that Ubuntu version via 
> https://askubuntu.com/questions/865554/how-do-i-install-python-3-6-using-apt-get
>
> I also installed 
>
> sudo -H python3.6 -m pip install jupyter
> sudo -H python3.6 -m pip install pexpect
> sudo -H python3.6 -m pip install matlab_kernel
>
>
> Now however I cannot open even simple org files, I obtain errors I attach
> and most of my keybinding and other things do not work.
>
> Any help is strongly appreciated.
>
> Regards
>

The whole transition from v2.x to v3.x for python has been a terrible
mess. Version issues are the most frustrating aspect of Python and one
reason I've never embraced the language.

Given that Ubuntu 16.04 was end of life in April 2021, my recommendation
would be to upgrade to ubuntu 21.04. That version seems to have a more
consistent Python environment (based on v3). It also has newer ciaro,
hafbuzz and other libs used by Emacs which will likely work better and
once Emacs 28.0 is released, will have the gccjit libs necessary for
native comp etc. 


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: after installing python3.6 on Ubuntu 16.04, org files open with errors
  2021-11-13  2:22 ` Tim Cross
@ 2021-11-13  9:59   ` Martin Schöön
  2021-11-13 15:39     ` Uwe Brauer
  2021-11-13 13:31   ` Max Nikulin
  2021-11-13 15:38   ` Uwe Brauer
  2 siblings, 1 reply; 13+ messages in thread
From: Martin Schöön @ 2021-11-13  9:59 UTC (permalink / raw)
  To: Tim Cross; +Cc: emacs-orgmode Mailinglist

[-- Attachment #1: Type: text/plain, Size: 1458 bytes --]

I learned the hard way not to mix distro installed Python with pip
installed Python. I now always use "pip install --user
 <some package>" to keep things sane.

/Martin

On Sat, 13 Nov 2021 at 03:29, Tim Cross <theophilusx@gmail.com> wrote:

>
> Uwe Brauer <oub@mat.ucm.es> writes:
>
> > Hi
> >
> > I am running Ubuntu 16.04 and I installed python3.6 (which is not
> > officially supported for that Ubuntu version via
> >
> https://askubuntu.com/questions/865554/how-do-i-install-python-3-6-using-apt-get
> >
> > I also installed
> >
> > sudo -H python3.6 -m pip install jupyter
> > sudo -H python3.6 -m pip install pexpect
> > sudo -H python3.6 -m pip install matlab_kernel
> >
> >
> > Now however I cannot open even simple org files, I obtain errors I attach
> > and most of my keybinding and other things do not work.
> >
> > Any help is strongly appreciated.
> >
> > Regards
> >
>
> The whole transition from v2.x to v3.x for python has been a terrible
> mess. Version issues are the most frustrating aspect of Python and one
> reason I've never embraced the language.
>
> Given that Ubuntu 16.04 was end of life in April 2021, my recommendation
> would be to upgrade to ubuntu 21.04. That version seems to have a more
> consistent Python environment (based on v3). It also has newer ciaro,
> hafbuzz and other libs used by Emacs which will likely work better and
> once Emacs 28.0 is released, will have the gccjit libs necessary for
> native comp etc.

[-- Attachment #2: Type: text/html, Size: 2181 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: after installing python3.6 on Ubuntu 16.04, org files open with errors
  2021-11-13  2:22 ` Tim Cross
  2021-11-13  9:59   ` Martin Schöön
@ 2021-11-13 13:31   ` Max Nikulin
  2021-11-13 15:48     ` Uwe Brauer
  2021-11-13 15:38   ` Uwe Brauer
  2 siblings, 1 reply; 13+ messages in thread
From: Max Nikulin @ 2021-11-13 13:31 UTC (permalink / raw)
  To: emacs-orgmode

On 13/11/2021 09:22, Tim Cross wrote:
> Uwe Brauer writes:
> 
> Given that Ubuntu 16.04 was end of life in April 2021, my recommendation
> would be to upgrade to ubuntu 21.04.

I would not recommend a release with end of support in January 2022 to a 
person who is trying to avoid upgrading despite 18.04 and 20.04 long 
time support releases are available.

 From mails to this list my impression is that 5-years old OS generates 
enough compatibility problems to seriously consider newer LTS version.

Support of python-2.7 and early 3.x version has been seized as well.

>>   File "/usr/lib/python3/dist-packages/dateutil/parser.py", line 25, in <module>
>>     from six import text_type, binary_type, integer_types
>> ModuleNotFoundError: No module named 'six'
                         ^^^^^^^^^^^^^^^^^^^^^

Another question: does ipython babel backend in Org uses the same python 
interpreter as python or it should be configured separately? Since you 
are using ipython, do you have it installed for python versions you are 
trying?



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: after installing python3.6 on Ubuntu 16.04, org files open with errors
  2021-11-13  2:22 ` Tim Cross
  2021-11-13  9:59   ` Martin Schöön
  2021-11-13 13:31   ` Max Nikulin
@ 2021-11-13 15:38   ` Uwe Brauer
  2021-11-13 18:39     ` Tim Cross
  2 siblings, 1 reply; 13+ messages in thread
From: Uwe Brauer @ 2021-11-13 15:38 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 812 bytes --]


> Uwe Brauer <oub@mat.ucm.es> writes:


> The whole transition from v2.x to v3.x for python has been a terrible
> mess. Version issues are the most frustrating aspect of Python and one
> reason I've never embraced the language.

> Given that Ubuntu 16.04 was end of life in April 2021, my recommendation
> would be to upgrade to ubuntu 21.04. That version seems to have a more
> consistent Python environment (based on v3). It also has newer ciaro,
> hafbuzz and other libs used by Emacs which will likely work better and
> once Emacs 28.0 is released, will have the gccjit libs necessary for
> native comp etc. 

Well in that case I'd rather would prefer 20.04 a LTS release. From
experience I know it will take me days till everything is working again,
but maybe it is time to do that step.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: after installing python3.6 on Ubuntu 16.04, org files open with errors
  2021-11-13  9:59   ` Martin Schöön
@ 2021-11-13 15:39     ` Uwe Brauer
  0 siblings, 0 replies; 13+ messages in thread
From: Uwe Brauer @ 2021-11-13 15:39 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 416 bytes --]

>>> "MS" == Martin Schöön <martin.schoon@gmail.com> writes:

> I learned the hard way not to mix distro installed Python with pip
> installed Python. I now always use "pip install --user
>  <some package>" to keep things sane.

Right, I installed python3.6 from a ppa, and that increased the mess. I uninstalled python3.6, also had to uninstall and then reinstall ob-ipython before I got rid of that error.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: after installing python3.6 on Ubuntu 16.04, org files open with errors
  2021-11-13 13:31   ` Max Nikulin
@ 2021-11-13 15:48     ` Uwe Brauer
  0 siblings, 0 replies; 13+ messages in thread
From: Uwe Brauer @ 2021-11-13 15:48 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1201 bytes --]

>>> "MN" == Max Nikulin <manikulin@gmail.com> writes:

> On 13/11/2021 09:22, Tim Cross wrote:
>> Uwe Brauer writes:
>> Given that Ubuntu 16.04 was end of life in April 2021, my
>> recommendation
>> would be to upgrade to ubuntu 21.04.

> I would not recommend a release with end of support in January 2022 to
> a person who is trying to avoid upgrading despite 18.04 and 20.04 long
> time support releases are available.

I think 20.04 is the best choice for me

> From mails to this list my impression is that 5-years old OS generates
> enough compatibility problems to seriously consider newer LTS version.

> Support of python-2.7 and early 3.x version has been seized as well.

>>> File "/usr/lib/python3/dist-packages/dateutil/parser.py", line 25, in <module>
>>> from six import text_type, binary_type, integer_types
>>> ModuleNotFoundError: No module named 'six'
>                         ^^^^^^^^^^^^^^^^^^^^^

That issue I could solve meanwhile but only to receive another error
ipython3 from my Ubuntu distribution but that corresponds to python 3.5
not 3.6 hm, ☹️ 

I think I rather upgrade Ubuntu or downgrade Matlab to make it work
again with python3.5

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: after installing python3.6 on Ubuntu 16.04, org files open with errors
  2021-11-13 15:38   ` Uwe Brauer
@ 2021-11-13 18:39     ` Tim Cross
  2021-11-14 17:12       ` Max Nikulin
  0 siblings, 1 reply; 13+ messages in thread
From: Tim Cross @ 2021-11-13 18:39 UTC (permalink / raw)
  To: emacs-orgmode


Uwe Brauer <oub@mat.ucm.es> writes:

> [[S/MIME Signed Part:Undecided]]
>
>> Uwe Brauer <oub@mat.ucm.es> writes:
>
>
>> The whole transition from v2.x to v3.x for python has been a terrible
>> mess. Version issues are the most frustrating aspect of Python and one
>> reason I've never embraced the language.
>
>> Given that Ubuntu 16.04 was end of life in April 2021, my recommendation
>> would be to upgrade to ubuntu 21.04. That version seems to have a more
>> consistent Python environment (based on v3). It also has newer ciaro,
>> hafbuzz and other libs used by Emacs which will likely work better and
>> once Emacs 28.0 is released, will have the gccjit libs necessary for
>> native comp etc. 
>
> Well in that case I'd rather would prefer 20.04 a LTS release. From
> experience I know it will take me days till everything is working again,
> but maybe it is time to do that step.
>

I would check what the status was with Python in 20.04. I'm not sure
they had completed the migration to v3 at that point and it was still a
mixed v2/v3 setup. Pretty sure by 21.04 it was all v3.

While I do find upgrades to a new version can be very disruptive if it
is left for a few versions, updates to the next version has been
minimally disruptive for me. I guess a lot depends on how much 'extra'
stuff you install and what tweaks you do, but for the last few years,
I've found the upgrades quite painless. A lot depends on what changes -
for example, I expect the update to 22.04 or maybe 22.10 will be more
disruptive due to the move to pipewire for sound.

One thing I do find useful is to upgrade a virtual first. I use
virt-manager to create a virtual machine running my current version and
then upgrade that to see how the upgrade goes. In fact, I tend to
maintain a VM which is the same as my current version and whenever I
need to make some potentially disruptive upgrades or configuration
changes - such as updating org to a new version or try out the latest
Emacs, I do that on the virtual machine first. This way, I don't
interfere with my core system and configuration and have time to
investigate any issues before doing the same on my core system. 


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: after installing python3.6 on Ubuntu 16.04, org files open with errors
  2021-11-13 18:39     ` Tim Cross
@ 2021-11-14 17:12       ` Max Nikulin
  2021-11-14 17:43         ` Uwe Brauer
  0 siblings, 1 reply; 13+ messages in thread
From: Max Nikulin @ 2021-11-14 17:12 UTC (permalink / raw)
  To: emacs-orgmode

On 14/11/2021 01:39, Tim Cross wrote:
> Uwe Brauer writes:
>> Well in that case I'd rather would prefer 20.04 a LTS release. From
>> experience I know it will take me days till everything is working again,
>> but maybe it is time to do that step.
> 
> I would check what the status was with Python in 20.04. I'm not sure
> they had completed the migration to v3 at that point and it was still a
> mixed v2/v3 setup. Pretty sure by 21.04 it was all v3.

Ubuntu-20.04: Python-3.8 is default, python-3.9 is available. Inkscape 
depends on python2:any.

dpkg -S /usr/bin/python
python-is-python2: /usr/bin/python

I have not noticed any problem with python3.

If some packages are considered as too old, e.g. Emacs-26.3 then 
Ubuntu-21.10 should be considered. At least it will be possible to 
upgrade it to Ubuntu-22.04 LTS in a single hop. Another option for rare 
upgrades is Debian stable.

> One thing I do find useful is to upgrade a virtual first. I use
> virt-manager to create a virtual machine running my current version and
> then upgrade that to see how the upgrade goes.

I tried Ubuntu-20.10 and Ubuntu-21.10 in qemu. With the former I faced a 
really weird bug with depressed shift in gdm3 password field (you have 
no chance to notice that only first letter typed with shift is 
capitalized), with the latter firefox does not always redraw tabs after 
switching them using Ctrl+PgUp or Ctrl+PgDown. Booting live image 
directly works better and allows to test hardware support, e.g. sound. I 
have not tried 21.10 in this way, with 20.10 default wayland session 
cursor on the external monitor was too huge to make point where it 
points to rather uncertain.

Problems with upgrade are usually caused by rarely used packages. So 
unless precise configuration is tried (dpkg --get-selections, dpkg 
--set-selections, third-party packages), the problem will not be noticed 
in VM. On the other hand installing all packages makes image size 
noticeably large.

>> That issue I could solve meanwhile but only to receive another error
>> ipython3 from my Ubuntu distribution but that corresponds to python 3.5
>> not 3.6 hm, ☹️ 

ipython may be installed to python 3.6 as well.




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: after installing python3.6 on Ubuntu 16.04, org files open with errors
  2021-11-14 17:12       ` Max Nikulin
@ 2021-11-14 17:43         ` Uwe Brauer
  0 siblings, 0 replies; 13+ messages in thread
From: Uwe Brauer @ 2021-11-14 17:43 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 640 bytes --]

>>> "MN" == Max Nikulin <manikulin@gmail.com> writes:

> On 14/11/2021 01:39, Tim Cross wrote:
>> Uwe Brauer writes:
>>> Well in that case I'd rather would prefer 20.04 a LTS release. From
>>> experience I know it will take me days till everything is working again,
>>> but maybe it is time to do that step.
>> I would check what the status was with Python in 20.04. I'm not sure
>> they had completed the migration to v3 at that point and it was still a
>> mixed v2/v3 setup. Pretty sure by 21.04 it was all v3.

I need still 2.7 to compile mercurial, since I rely on some extensions
for mercurial that do not work under 3.X 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [downgrading to matlab 2019a and using 3.5 NOW does not work neither] (was: after installing python3.6 on Ubuntu 16.04, org files open with errors)
  2021-11-12 22:15 after installing python3.6 on Ubuntu 16.04, org files open with errors Uwe Brauer
  2021-11-13  2:22 ` Tim Cross
@ 2021-11-14 17:49 ` Uwe Brauer
  2021-11-15 13:31   ` [SOLVED] (was: [downgrading to matlab 2019a and using 3.5 NOW does not work neither]) Uwe Brauer
  1 sibling, 1 reply; 13+ messages in thread
From: Uwe Brauer @ 2021-11-14 17:49 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1671 bytes --]

>>> "UB" == Uwe Brauer <oub@mat.ucm.es> writes:

> Hi

> I am running Ubuntu 16.04 and I installed python3.6 (which is not
> officially supported for that Ubuntu version via 
> https://askubuntu.com/questions/865554/how-do-i-install-python-3-6-using-apt-get

> I also installed 

> sudo -H python3.6 -m pip install jupyter
> sudo -H python3.6 -m pip install pexpect
> sudo -H python3.6 -m pip install matlab_kernel

I finally gave up that approach: I uninstalled 2019b and installed 2019a
(the latest version that is compatible with 3.5). I uninstalled 3.6 and
all the packages I installed with pip

I installed the mathwork python engine. 

But now ob-ipython gives me an serious error, so that org mode is basically not usable. I have to comment out 
(require 'ob-ipython)
BTW since I installed it via the emacs package system that require
shouldn't be necessary?

In any case I obtain the following serious error when opening an
org-file

Debugger entered--Lisp error: (json-readtable-error 84)
  signal(json-readtable-error (84))
  json-read()
  json-read-array()
  json-read()
  json-read-from-string("[TerminalIPythonApp] WARNING | Subcommand `ipython...")
  ob-ipython--get-kernels()
  ob-ipython-auto-configure-kernels()
  run-hooks(change-major-mode-after-body-hook text-mode-hook outline-mode-hook org-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook text-mode-hook outline-mode-hook org-mode-hook))


Etc

I have set 
(setq ob-ipython-command "ipython")

The default is jupyter, but it gives the same error. 

I am now puzzled. Is there anybody still using this package?

Regards

Uwe Brauer 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [SOLVED] (was: [downgrading to matlab 2019a and using 3.5 NOW does not work neither])
  2021-11-14 17:49 ` [downgrading to matlab 2019a and using 3.5 NOW does not work neither] (was: after installing python3.6 on Ubuntu 16.04, org files open with errors) Uwe Brauer
@ 2021-11-15 13:31   ` Uwe Brauer
  2021-11-15 14:51     ` Max Nikulin
  0 siblings, 1 reply; 13+ messages in thread
From: Uwe Brauer @ 2021-11-15 13:31 UTC (permalink / raw)
  To: emacs-orgmode



It was quite an ordeal, just in case someone runs into a similar problem.

Advice: don't try to upgrade python on a given Ubuntu distribution!!!!

* reinstall jupyter

#+begin_src 
sudo dpkg --purge python3-ptyprocess
sudo -H pip3 install --upgrade --force-reinstall --no-cache-dir jupyter
sudo -H pip3 install --upgrade --force-reinstall --no-cache-dir numpy
sudo -H pip3 install --upgrade --force-reinstall --no-cache-dir pymatbridge
sudo -H pip3 install --upgrade --force-reinstall --no-cache-dir matlab_kernel
#+end_src

* check https://github.com/Calysto/matlab_kernel#kernel-times-out-while-starting
#+begin_src 

python3 -m matlab_kernel.check 
#+end_src


That told me to look for a matlab solution

* matlab solution for Ubuntu 16.04
https://de.mathworks.com/matlabcentral/answers/403561-import-error-matlab-engine-in-python

** solve the gcc library problem

#+begin_src 

LD_LIBRARY_PATH=/usr/local/lib64/:$LD_LIBRARY_PATH
$ export LD_LIBRARY_PATH
$ sudo apt-add-repository ppa:ubuntu-toolchain-r/test
$ sudo apt-get update
$ sudo apt-get install gcc-6 g++-6
#+end_src
** install the engine again
#+begin_src 

cd /usr/local/MATLAB/R2019a/extern/engines/python/
sudo /usr/bin/python3 setup.py install
#+end_src


** Start the engine

DONE!   



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [SOLVED] (was: [downgrading to matlab 2019a and using 3.5 NOW does not work neither])
  2021-11-15 13:31   ` [SOLVED] (was: [downgrading to matlab 2019a and using 3.5 NOW does not work neither]) Uwe Brauer
@ 2021-11-15 14:51     ` Max Nikulin
  0 siblings, 0 replies; 13+ messages in thread
From: Max Nikulin @ 2021-11-15 14:51 UTC (permalink / raw)
  To: emacs-orgmode

On 15/11/2021 20:31, Uwe Brauer wrote:
> Advice: don't try to upgrade python on a given Ubuntu distribution!!!!

Anover advice:
1. Avoid unsupported versions of software (Ubuntu-16.04 has only payed 
support for more than a year) and localize its usage if there is no 
other way.

> * reinstall jupyter
> 
> #+begin_src
> sudo dpkg --purge python3-ptyprocess
> sudo -H pip3 install --upgrade --force-reinstall --no-cache-dir jupyter

2. Use venv (virtualenv for Python-2.7) to keep packages installed by 
pip isolated from system .deb's.

 > I need still 2.7 to compile mercurial, since I rely on some extensions
 > for mercurial that do not work under 3.X

Ubuntu-20.04 has (already unsupported) Python-2.7 in addition to 3.8 and 
3.9.

It is better to keep primary system up to date and to use containers 
(LXC, docker, etc.) or fully virtualized systems for special needs.



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-11-15 14:52 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-12 22:15 after installing python3.6 on Ubuntu 16.04, org files open with errors Uwe Brauer
2021-11-13  2:22 ` Tim Cross
2021-11-13  9:59   ` Martin Schöön
2021-11-13 15:39     ` Uwe Brauer
2021-11-13 13:31   ` Max Nikulin
2021-11-13 15:48     ` Uwe Brauer
2021-11-13 15:38   ` Uwe Brauer
2021-11-13 18:39     ` Tim Cross
2021-11-14 17:12       ` Max Nikulin
2021-11-14 17:43         ` Uwe Brauer
2021-11-14 17:49 ` [downgrading to matlab 2019a and using 3.5 NOW does not work neither] (was: after installing python3.6 on Ubuntu 16.04, org files open with errors) Uwe Brauer
2021-11-15 13:31   ` [SOLVED] (was: [downgrading to matlab 2019a and using 3.5 NOW does not work neither]) Uwe Brauer
2021-11-15 14:51     ` Max Nikulin

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).