yes i concur with this request
Steffen - how are you working around it today - previously i was installing modules into the raw python environment but am now tired of this breaking everytime i update python and on my new Mac
I tried using https://github.com/MichaelAquilina/zsh-autoswitch-virtualenv with a default venv configuration but this appears not to work for me in Royal TSX despite working great in my terminal
Anthony, on my old Mac installed the modules in the system wide Python which compromises the system and throws a lot of errors and warnings. On my new Mac I didn't do it and are not allowed to do so.
Since - like you - I couldn't find a working virtualenv solution and use those dynamic folders on my old Mac only. :-(
On my new Mac I generate a "no so dynamic" folder outside of Royal-TSX and import that, but that contradicts the dynamic folder feature.
Currently I am not sure if I will extend my Royal-TSX license when it's renewal is due. Royal-TSX is great, but without dynamic Python folders only half as good as I would like it to be.
I've found a workaround that finally works....
mac defaults to ZSH now which is fine - on my new mac my bash profile is missing which is great
I created a default venv environment in my home folder e.g.:
python3 -m venv .venv
then you can activate this and install whatever modules you need etc.
then in .bash_profile i have only the following (edit for your username):
export PATH="/Users/asomerset/.venv/bin:${PATH}"
then in the Dynamic folder settings set it to use the Bash shell and enable the evaluate shell profile option
I was hammering at this in .bashrc to realise that Royal TSX does not appear to load .bashrc at all but it does load .bash_profile i suspect i have a similar issue with .zshrc as well but i prefer this approach as it keeps the environment royal tsx loads clean and unbloated (not like my ZSH/Oh-My-ZSH setup_
you can name and locate that venv whatever you like as long as you update the path entry in the bash_profile
Steffen
In modern MacOS versions it is recommended to install additional Python modules (pip3 install ...) in Python Virtual Environments (virtenv) only.
So you can't use Python modules in dynamic folders, if they are not part of the base Python installation - which most aren't.
So it is necessary to start a Python virtenv before executing a Python based dynamic folder script.
As a side effect this would make it also possible to use multiple Python and module/library versions.
(Since I use MacOS only, my recomendation / feature request ist for TSX, but I suspect that this might be true for the Windows version as well.)
Thanks in advance,
Steffen
1 person likes this idea