On 8/13/20 7:54 PM, Uwe Brauer wrote:
    > Hi Uwe,
    > On Thu, Aug 13, 2020, 17:50 Uwe Brauer 
<oub-YB6e1s5WF/he5aofshc...@public.gmane.org> wrote:


    > The '.' is an alias to the 'source' shell command. It reads and executes
    > the file provided as arguments.
    > See section "Shell Builtin Commands" at:
    > https://linux.die.net/man/1/bash

Ah this is a bash thing, I have used only tcsh all my life and haven't
come across that.


Ok. If using less common choices, some documentation will not apply directly ;-)

https://docs.python.org/3/tutorial/venv.html#creating-virtual-environments hints that you might be able to source activate.csh instead. Or just use bash for this.


But I still don't understand


cd kallithea  #OK
python3 -m venv ../kallithea-venv #OK
. ../kallithea-venv/bin/activate #OK
pip install --upgrade pip setuptools # this is system wide


No, it is not system wide. When the virtualenv is activated, it will modify PATH to start with ../kallithea-venv/bin/ where it's own pip (and python) "binaries" are available - they will work inside the virtualenv, not globally.

Since you are not running as root, there is also no way it could have modified anything system wide.


pip install --upgrade -e . # this is system wide
python3 setup.py compile_catalog   # for translation of the UI

Now I get
pip install --upgrade -e . # this is system wide
ERROR: File "setup.py" not found. Directory cannot be installed in editable 
mode: /home/oub/src


Are you still in the directory of the kallithea source (with a setup.py)?


pip install --upgrade -e .
,----
| Obtaining file:///home/oub/src/kallithea
|     Complete output from command python setup.py egg_info:
|     Traceback (most recent call last):
|       File "<string>", line 1, in <module>
|       File "/home/oub/src/kallithea/setup.py", line 13, in <module>
|         raise Exception('Kallithea requires Python 3.6 or later')
|     Exception: Kallithea requires Python 3.6 or later
`----

Ok so this is impossible. Sigh


No, it is not impossible. You just didn't activate the virtualenv - thus the later commands doesn't work as intended. Either use bash, or activate your csh.


Then I checked the documentation about virtualenv

python3 -m venv /srv/kallithea/venv

Gives me an error
Permission denied: '/srv/kallithea'

So shall I run this as root?


I suggest creating /srv/kallithea as root, and chown it to the kallithea user. (I am trying to tweak the documentation based on your input and already had some draft changes to this.)


I am a bit confused about who (root or normal user) to install and
where, globally in the system or in .local


Other than creating the installation directory (which could be elsewhere), there should not be any global or .local changes. Just active the virtualenv first (or run binaries in the virtualenv's bin directory).

/Mads
_______________________________________________
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general

Reply via email to