New installation log

113 views
Skip to first unread message

Edward K. Ream

unread,
Mar 28, 2020, 10:00:14 AM3/28/20
to leo-editor
I've lost patience with Anaconda3. This thread documents a clean install of python on Windows. I continue to use Leo's git code.

Imo, virtual environments are a pain in the butt. I've got enough trouble remembering what git branch I am on. Having multiple forks/envs is too much for my brain.

Happily, installing python is really simple w/o Anaconda:

Download

Python's download page does not seem to have an executable installer for Python 3.6.x! Clicking 3.6 takes you here. There are security problems with 3.6.8, so we really want 3.6.10, but the page only shows two zipped tarballs. So while Leo is supposed to run on python 3.6, it looks like we may as well move to 3.7.6.

Install

I installed Python 3.7.6 to ~/python/python37, because I dislike installing anything to "program files". (The space in the name causes problems.) I checked the "Add python to the path" checkbox. I installed everything except the python test files.

Attempting to run leo correctly raises a Tk dialog saying that Qt can not be imported.

I upgraded to the latest version of pip, then did `pip install PyQt5`. Now Leo ran.

Summary

I uninstalled Anaconda3. No more confusing envs. Bye bye activation woes.

In the worst case I would would have to reinstall python and all libs. That would be better than the endless confusion of multiple envs.

It's easy to install python using an executable installer and `pip install PyQt5`.

Leo is supposed to run on python 3.6, but python 3.7 looks like the practical minimum for new python installations.

I'll now experiment with installing the prerequisites for jupyter, holoviews etc. This should be straightforward with pip.

Edward

Edward K. Ream

unread,
Mar 28, 2020, 10:28:34 AM3/28/20
to leo-editor
On Sat, Mar 28, 2020 at 9:00 AM Edward K. Ream <edre...@gmail.com> wrote:

> I'll now experiment with installing the prerequisites for jupyter, holoviews etc. This should be straightforward with pip.

Indeed it was. Everything is easy with pip. From my notes, not my memory:

Install nbformat

Starting Leo message gave this message: `import-jupyter-notebook requires nbformat package`

> pip install nbformat

Successfully installed
  attrs-19.3.0'
  decorator-4.4.2
  importlib-metadata-1.6.0'
  ipython-genutils-0.2.0
  jsonschema-3.2.0
  jupyter-core-4.6.3
  nbformat-5.0.4
  pyrsistent-0.16.0
  pywin32-227
  six-1.14.0
  traitlets-4.3.3
  zipp-3.1.0

Install holoviews

This page gives various ways of installing holoviews with pip.

1. The complete installation failed: pip install "holoviews[all]"

ERROR: Could not find a version that satisfies the requirement bzip2; extra == "all" (from holoviews[all])
   (from versions: none)
ERROR: No matching distribution found for bzip2; extra == "all" (from holoviews[all])

2. The recommended installation worked: pip install "holoviews[recommended]"

The end of the console log was:

installing collected packages: param, pytz, numpy, python-dateutil, pandas, pyviz-comms, tqdm, typing-extensions, tornado, MarkupSafe, jinja2, pillow, PyYAML, pyparsing, packaging, bokeh, markdown, pyct, panel, cycler, kiwisolver, matplotlib, parso, jedi, pickleshare, pygments, wcwidth, prompt-toolkit, backcall, colorama, ipython, pyzmq, jupyter-client, ipykernel, prometheus-client, Send2Trash, testpath, mistune, pandocfilters, webencodings, bleach, defusedxml, entrypoints, nbconvert, pywinpty, terminado, notebook, holoviews
    Running setup.py install for backcall ... done
    Running setup.py install for prometheus-client ... done
    Running setup.py install for pandocfilters ... done
Successfully installed
  MarkupSafe-1.1.1
  PyYAML-5.3.1
  Send2Trash-1.5.0
  backcall-0.1.0
  bleach-3.1.4
  bokeh-2.0.0
  colorama-0.4.3
  cycler-0.10.0
  defusedxml-0.6.0
  entrypoints-0.3
  holoviews-1.13.1
  ipykernel-5.2.0
  ipython-7.13.0
  jedi-0.16.0
  jinja2-2.11.1
  jupyter-client-6.1.2
  kiwisolver-1.1.0
  markdown-3.2.1
  matplotlib-3.2.1
  mistune-0.8.4
  nbconvert-5.6.1
  notebook-6.0.3
  numpy-1.18.2
  packaging-20.3
  pandas-1.0.3
  pandocfilters-1.4.2
  panel-0.9.3
  param-1.9.3
  parso-0.6.2
  pickleshare-0.7.5
  pillow-7.0.0
  prometheus-client-0.7.1
  prompt-toolkit-3.0.5
  pyct-0.4.6
  pygments-2.6.1
  pyparsing-2.4.6
  python-dateutil-2.8.1
  pytz-2019.3
  pyviz-comms-0.7.4
  pywinpty-0.5.7
  pyzmq-19.0.0
  terminado-0.8.3
  testpath-0.4.4
  tornado-6.0.4
  tqdm-4.43.0
  typing-extensions-3.7.4.1
  wcwidth-0.1.9
  webencodings-0.5.1

Install docutils

Restarting Leo gave this message: Warning: viewrendered3.py running without docutils.

>pip install docutils

Successfully installed docutils-0.16

Running holoviews

At last this script ran within Leo:

import holoviews as hv
hv.extension('matplotlib')
xs = range(-10, 11)
ys = [100-z**2 for z in xs]
curve = hv.Curve((xs, ys))
hv.save(curve, 'curve.png')
print('done')

matplotlib is giving a deprecation warning:

...\Python\Python37\lib\_collections_abc.py:841: MatplotlibDeprecationWarning:
The datapath rcparam was deprecated in Matplotlib 3.2.1 and will be removed two minor releases later.

Programs can call warnings.filterwarnings to suppress such things, so it looks like we are good to go.

Edward

Edward K. Ream

unread,
Mar 28, 2020, 10:44:53 AM3/28/20
to leo-editor
On Saturday, March 28, 2020 at 9:28:34 AM UTC-5, Edward K. Ream wrote:


matplotlib is giving a deprecation warning:

Rev 35ad24f in devel hacks vr3 to ignore all warnings for now.

Edward

Thomas Passin

unread,
Mar 28, 2020, 12:12:08 PM3/28/20
to leo-editor
Linux Mint is still on Python 3.6.9.  I think that's what Debian is at too, since the Mint package is basically the Debian one, though I'm not 100% sure.   Ubuntu is up to 3.7.6

Viktor Ransmayr

unread,
Mar 28, 2020, 3:31:47 PM3/28/20
to leo-e...@googlegroups.com
Hello Thomas,

Am Sa., 28. März 2020 um 17:12 Uhr schrieb Thomas Passin <tbp1...@gmail.com>:
Linux Mint is still on Python 3.6.9.  I think that's what Debian is at too, since the Mint package is basically the Debian one, though I'm not 100% sure.   Ubuntu is up to 3.7.6

I did a quick check for Debian. - The Python 3 version for Debian 10 is 3.7.3

With kind regards,

Viktor

Matt Wilkie

unread,
Mar 29, 2020, 12:13:57 AM3/29/20
to leo-editor
I uninstalled Anaconda3. No more confusing envs. Bye bye activation woes.

For the benefit of the thread, not because I'm trying to persuade you or anyone else to go back to Anaconda or Miniconda:

If you install Leo (or whatever) into the base environment instead of creating a distinct envs for projects you can get the simplicity of a single system environment, similar to installing python the regular way, and still use the conda package manager (if that's a desirable thing for your work).

In this case add the base env bin to PATH so it's always available or use the system menu 'Anaconda Prompt' (which is the same as `activate` with no env specified).

It should be noted this goes against the grain of Anaconda's design and they recommend against it. Still works though!

-matt

Edward K. Ream

unread,
Mar 29, 2020, 6:09:38 AM3/29/20
to leo-editor
On Sat, Mar 28, 2020 at 11:13 PM Matt Wilkie <map...@gmail.com> wrote:

If you install Leo (or whatever) into the base environment instead of creating a distinct envs for projects you can get the simplicity of a single system environment, similar to installing python the regular way, and still use the conda package manager (if that's a desirable thing for your work).

In this case add the base env bin to PATH so it's always available or use the system menu 'Anaconda Prompt' (which is the same as `activate` with no env specified).

It should be noted this goes against the grain of Anaconda's design and they recommend against it. Still works though!

Thanks for these comments. Imo, Anaconda has become harder to use in the last year or so. Not sure why.

Aha: Now that Leo requires python 3, we can assume pip is always available. (Actually, people may have to use apt-get on Linux to get pip3.) In my recent experience, pip is easier to use and more solid than conda. Ymmv.

I am seriously considering ignoring Anaconda and miniconda in Leo's installation instructions:

Install python 3
(ubuntu) apt-get install pip3
pip install PyQt5
(optional, if not using git) pip install leo

And that's it. Comments?

Edward

Edward K. Ream

unread,
Mar 29, 2020, 6:12:51 AM3/29/20
to leo-editor
On Saturday, March 28, 2020 at 9:00:14 AM UTC-5, Edward K. Ream wrote:

> It's easy to install python using an executable installer and `pip install PyQt5`.

Installation is simple because at each step it's clear what to install next. That's because of various console messages within Leo.

In other words, it's quite possible to install the prerequisites for Leo without having to remember anything, except maybe the line above.

Edward



vitalije

unread,
Mar 29, 2020, 7:01:21 AM3/29/20
to leo-editor
I use anaconda on all my computers, but I install packages using `pip install`not `conda`. I also don't create nor use any conda environments.

I like the fact that anaconda is installed, by default, in my home folder. So, installing packages doesn't require root privileges. The only trouble I sometimes have is that some programs rely on /usr/bin/python and not on python found in the PATH (which is anaconda python).

Vitalije

Edward K. Ream

unread,
Mar 29, 2020, 7:04:25 AM3/29/20
to leo-editor
On Sun, Mar 29, 2020 at 6:01 AM vitalije <vita...@gmail.com> wrote:
I use anaconda on all my computers, but I install packages using `pip install`not `conda`. I also don't create nor use any conda environments.

I like the fact that anaconda is installed, by default, in my home folder. So, installing packages doesn't require root privileges. The only trouble I sometimes have is that some programs rely on /usr/bin/python and not on python found in the PATH (which is anaconda python).

Thanks for these comments. I'm not ever going to dissuade people from using Anaconda, but I'm not sure the present encouragement is all that helpful.

Edward

Brian Theado

unread,
Mar 29, 2020, 10:27:36 AM3/29/20
to leo-editor


On Sun, Mar 29, 2020 at 6:09 AM Edward K. Ream <edre...@gmail.com> wrote:
[...] 
I am seriously considering ignoring Anaconda and miniconda in Leo's installation instructions:

Install python 3
(ubuntu) apt-get install pip3
pip install PyQt5
(optional, if not using git) pip install leo

PyQt5 isn't the only requirement for leo. The setup.py file (used by pip) has all the requirements. Maybe these instructions would be better as it would get all the dependencies and not just PyQt5:

Install python3
if not using git:
pip install leo
If using git:
git clone ....
pip install --editable leo-editor

I haven't personally tested these steps recently, but have done so at one time or another (using virtual environment).

Matt Wilkie

unread,
Mar 29, 2020, 2:21:05 PM3/29/20
to leo-editor
PyQt5 isn't the only requirement for leo. The setup.py file (used by pip) has all the requirements. Maybe these instructions would be better as it would get all the dependencies and not just PyQt5:

Install python3
if not using git:
pip install leo
If using git:
git clone ....
pip install --editable leo-editor

 
As of py3.6 this should always work.

Linux can add a wrinkle with system vs user installs. User is safer in my experience. Morale of a painful story I havn't shared: never use `sudo pip install`. It can take a looong time to extricate from mixed up  package manager installs and pip installs in system.

-matt

vitalije

unread,
Mar 29, 2020, 2:49:30 PM3/29/20
to leo-editor


On Sunday, March 29, 2020 at 8:21:05 PM UTC+2, Matt Wilkie wrote:

Linux can add a wrinkle with system vs user installs. User is safer in my experience. Morale of a painful story I havn't shared: never use `sudo pip install`. It can take a looong time to extricate from mixed up  package manager installs and pip installs in system.

-matt


That's exactly why I prefer anaconda. It never  requires root privileges, so there is no need for doing `sudo pip install`.

Vitalije

Thomas Passin

unread,
Mar 29, 2020, 3:48:21 PM3/29/20
to leo-editor
OTOH, I have installed as a user on Linux distros many times using pip install, and never had a problem. Never needed to consider using sudo.

Matt Wilkie

unread,
Mar 29, 2020, 10:07:37 PM3/29/20
to leo-editor

OTOH, I have installed as a user on Linux distros many times using pip install, and never had a problem. Never needed to consider using sudo.

Did/do you need to pass `--user` flag?

pip install --user foobaz

I got into the sudo mess because I didn't know about the user flag, tried to just `pip install foo`, got a permission denied error, so reached for sudo out of habit, because that's what you need for apt installs. That's when I discovered conda and have stayed there since. It would be be good news if they've since made user installs the default. (I was on Mint 17 or 18 if memory serves).

-matt

Edward K. Ream

unread,
Mar 30, 2020, 6:07:02 AM3/30/20
to leo-editor
On Sunday, March 29, 2020 at 5:09:38 AM UTC-5, Edward K. Ream wrote:

> I am seriously considering ignoring Anaconda and miniconda in Leo's installation instructions:

Belay that.

Your comments have convinced me that there is no reason to endorse pip, Anaconda or miniconda. In effect, these are preferences.

Leo's installation instructions are neutral about these options. I see no reason to change them.

Edward

Thomas Passin

unread,
Mar 30, 2020, 7:54:16 AM3/30/20
to leo-editor


On Sunday, March 29, 2020 at 10:07:37 PM UTC-4, Matt Wilkie wrote:

OTOH, I have installed as a user on Linux distros many times using pip install, and never had a problem. Never needed to consider using sudo.

Did/do you need to pass `--user` flag?

pip install --user foobaz

I don't think I ever used it. For sure I didn't use it when I have installed Leo and its dependencies.  I always used the python installations that came system-installed.  The systems were usually Mint and Ubuntu.   Maybe that's a good reason for using the system-installed Python and not Python you installed outside of the system packaging mechanism.
Reply all
Reply to author
Forward
0 new messages