Libraries from the local folder are not imported
See original GitHub issueDescribe the bug
With the latest version (0.16.0.0) the libraries from the local folder __pypackages__
are not imported.
How to reproduce
python3 -m pip install --user pythonloc
python3 -m pipx ensurepath
piploc install flask
pipx run --pypackages flask
Traceback
Traceback (most recent call last):
File "/home/martin/workspace/flask-desktop/__pypackages__/3.8/lib/bin/flask", line 5, in <module>
from flask.cli import main
ModuleNotFoundError: No module named 'flask'
Expected behavior
It should show the following:
Usage: flask [OPTIONS] COMMAND [ARGS]...
A general utility script for Flask applications.
Provides commands from Flask, extensions, and the application. Loads the
application defined in the FLASK_APP environment variable, or from a
wsgi.py file. Setting the FLASK_ENV environment variable to 'development'
will enable debug mode.
$ export FLASK_APP=hello.py
$ export FLASK_ENV=development
$ flask run
Options:
--version Show the flask version
--help Show this message and exit.
Commands:
db Perform database migrations.
lint Lint and check code style with 'flake8' and 'isort' recursively.
ps Perform postgres operations.
roles Role commands.
routes Show the routes for the app.
run Run a development server.
shell Run a shell in the app context.
users User commands.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Import library from local folder without editing system path
Importing the library through pip install; Moving folders into site-packages; Editing the system PATH. So far the answers I've seen on stack ...
Read more >Change where your music files are stored on Mac
Change where imported files are stored on your Mac, choose Music > Settings, then click Files. · Consolidate your files in the Music...
Read more >Installing Libraries | Arduino Documentation
Importing a .zip Library. Libraries are often distributed as a ZIP file or folder. The name of the folder is the name of...
Read more >Importing and Managing Media - LWKS - Video Editing Software
2. Click on the Local Files option under 'Libraries'. 3. Click on the Places dropdown arrow to navigate to the drive and folder...
Read more >Python – Import module from different directory - GeeksforGeeks
Let's suppose, to import how to import file in Python, we have two different folders, one contains main.py which is our main Python...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ohhh I see what’s happening. One part of our code
run_pypackage_bin
adds the__pypackages__
path to env variablePYTHONPATH
, and thenexec_app
uses_fix_subprocess_env
to removePYTHONPATH
before running the code.Here is the helpful comment in the code:
Hmmm. Seems we have a fix in conflict with the operation of a feature. (See #233)
I am using the only one and the default python version that comes in Linux Mint 20.04.