poljar / weechat-matrix

Weechat Matrix protocol script written in python
Other
955 stars 119 forks source link

Add support for python3 venvs #178

Open cubetastic33 opened 4 years ago

cubetastic33 commented 4 years ago

Since python 3.5, python3 venvs are recommended - so can support for them be added? I found this issue where support for virtualenvs was added, and a person mentioned that the method didn't support python3 venvs.

wombelix commented 4 years ago

As mentioned in #105 by @matthijskooijman - comment - creating a "activate_this.py" file in the bin folder of a Python3 venv is actually a functional workaround.

The similar approach was mentioned on StackOverflow as well.

I'm running openSUSE Tumbleweed, created the virtual environment by executing python3 -m ~/.weechat/python/venv and manually added the file ~/.weechat/python/venv/bin/activate_this.py, it's working without issues so far.

activate_this.py source