[how to install 0.5.2 with python2.7?]

Thomas De Schampheleire patrickdepinguin at gmail.com
Sat Aug 15 05:31:53 UTC 2020


Hi Uwe,

On Fri, Aug 14, 2020, 22:14 Uwe Brauer <oub at mat.ucm.es> wrote:

>
>    > Hi Uwe,
>    > On Fri, Aug 14, 2020, 17:35 Uwe Brauer <oub at mat.ucm.es> wrote:
>
>
>    > Our docs on readthedocs do not currently retain documentation for
> obsolete
>    > versions. I'm not sure if this is really good practice, but today
> it's like
>    > that.
>
>    > To get documentation for your chosen version, please see the 'docs'
>    > directory in the kallithea source distribution and find the
> appropriate rst
>    > file.
>
> Here is what I did
>
>
>   hg up 0.5.2 (there is a corresponding tag)
>
>
> I followed the instructions in docs/installation.rst
>
>
>         cd kallithea
>         virtualenv ../kallithea-venv
> and this already failed!
>
> File "/usr/bin/virtualenv", line 5, in <module>
>     from pkg_resources import load_entry_point
>   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line
> 2927, in <module>
>     @_call_aside
>   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line
> 2913, in _call_aside
>     f(*args, **kwargs)
>   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line
> 2952, in _initialize_master_working_set
>     add_activation_listener(lambda dist: dist.activate())
>   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line
> 956, in subscribe
>     callback(dist)
>   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line
> 2952, in <lambda>
>     add_activation_listener(lambda dist: dist.activate())
>   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line
> 2515, in activate
>     declare_namespace(pkg)
>   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line
> 2097, in declare_namespace
>     _handle_ns(packageName, path_item)
>   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line
> 2047, in _handle_ns
>     _rebuild_mod_path(path, packageName, module)
>   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line
> 2066, in _rebuild_mod_path
>     orig_path.sort(key=position_in_sys_path)
> AttributeError: '_NamespacePath' object has no attribute 'sort'
>
> Why on earth he is using python3 is beyond me.
>

The 'virtualenv' program will use the 'python' program found in PATH. This
ised to be a 2.7 python in most distributions but is python 3 in more
recent distributions.

You can specify a specific python version woth the -p parameter:

virtualenv -p python2.7 ../kallithea-venv



> Ubuntu offers
> python3-virtualenv
> and
> virtualenv
>
> So I presume that virtualenv is for 2.7
>

The 'virtualenv' program still works for python3 but the alternative
approach of 'python -m venv' is preferred. But that did not yet exist in
python 2.7 world.

Best regards
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sfconservancy.org/pipermail/kallithea-general/attachments/20200815/63cfacf4/attachment-0001.html>


More information about the kallithea-general mailing list