[New-bugs-announce] [issue40272] ModuleNotFoundEror thrown by system python while accessing it specifically via venv python

Gavin D'souza report at bugs.python.org
Mon Apr 13 06:46:31 EDT 2020


New submission from Gavin D'souza <gavin18d at gmail.com>:

I have a tool that works as a wrapper over a web framework which in turn utilizes a virtualenv environment. So every app to be installed for a project is installed in it's own env folder. 

Recently, the virtualenv has been breaking throwing 'ModuleNotFoundError's however this issue only persists in macOS. The applications installed in each project's env are editable installs. The ModuleNotFoundError's are raised by the global python install which is all the more confusing as the commands are specifically executing using absolute paths in the env python and should be in the env site-packages. Even after successful env installs, activating the env and simply typing "import frappe" throws a ModuleNotFoundError. 

Reference commands executed by the wrapper program are like
./env/bin/python -m install -q -U -e ./apps/frappe

have also tried absolute paths but faced the same issue. However, this issue doesn't persist while using pyenv on macOS. Linux systems work fine too.

----------
components: macOS
messages: 366299
nosy: gavin, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: ModuleNotFoundEror thrown by system python while accessing it specifically via venv python
type: behavior
versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40272>
_______________________________________


More information about the New-bugs-announce mailing list