Closed ttylec closed 3 years ago
I have to admit that, although it's not recommended, I usually use the system Python (with pip install --user
for packages), so I hadn't noticed this. Thanks for letting me know!
Judging by the error message, it seems the pyan module is not getting installed to site-packages of the temporary venv for some reason. I take it installing other packages in a temporary venv works?
Yes, it works. Just a bit more details:
when pip installed from git repo within temporary virtualenv
(tmp-1aed8d19cf30cb7d) ➜ pyan git:(master) ✗ head $(which pyan3)
#!/home/ttylec/.virtualenvs/tmp-1aed8d19cf30cb7d/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
and when pip installed from pypi:
(tmp-5cd86f124b295af1) ➜ tmp-5cd86f124b295af1 head $(which pyan3)
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
In the latter case, the python interpreter path if not set properly (it points to system interpreter, not one within venv).
Thanks the analysis! The script using the wrong interpreter explains why it's not finding the module. Wait, I thought I already fix... aaaah, no, I didn't! See #11.
The hardcoded hashbang is at least part of it - there may also be something else. I suppose I'll first fix #11, and then set up a venv and have a look myself. :)
PyPI package pyan3
updated. Please try again with the latest version, and reopen this issue if necessary.
(This should work in the new 1.1.1.)
Here is what I got when installed in fresh temporary python venv:
Installing from within cloned repo works.