Howto run with a framework version of python
See original GitHub issueI’m starting a wxPython project which requires a framework build of Python. I installed 3.6.4 from Python.org including all the options, and have pipenv use it with the pipenv --python 3.6.4
arguments (followed by a pipenv install wxpython
).
Pipenv tells us it’s using a framework build of python (path contains Python.framework):
Using /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6m to create virtualenv…
However the program won’t run, it says it’s not using a framework build of python.
Describe your environment
- macOs High Sierra 10.13.3
- Python version: 3.6.4
- Pipenv version: pipenv, version 9.0.3
Expected result
Expect the virtual environment to use the installed framework version of python.
Actual result
This program needs access to the screen. Please run with a Framework build of python, and only when you are logged in on the main display of your Mac.
Steps to replicate
- install python.org 3.6.4 with the default installation options, reinstall pip3; and pipenv, pew and virtualenv with --user.
mkdir wxpythontest && cd wxpythontest
pipenv --python 3.6.4
pipenv install wxpython
curl https://gist.githubusercontent.com/svandragt/d1f0d6e2b3d19053b940fffecb3de88e/raw/4b4f9cb881f5dab6f97b96d3ca0ef4347a0a218e/hello.py -O hello.py
pipenv run python hello.py
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
how to run a Framework build of python (and can that ... - GitHub
$ python example_progress_bar_1.py This program needs access to the screen. Please run with a Framework build of python, and only when you are ......
Read more >How to ensure I use the correct python version when I have ...
Manually change the default version · Setup aliases to the different versions: tmp$ type python3.7 python3.7 is aliased to `/usr/local/opt/python ...
Read more >5. Using Python on a Mac — Python 3.11.1 documentation
Running scripts with a GUI¶. With older versions of Python, there is one macOS quirk that you need to be aware of: programs...
Read more >Web development with Python on Windows | Microsoft Learn
A step-by-step guide to get started using Python for web development on Windows, including set up for frameworks like Flask and Django.
Read more >How to install Django
This document will get you up and running with Django. Install Python¶. Django is a Python web framework. See What Python version can...
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
Hey all, Don’t want to re-open this issue, but it comes up as a prominent result when googling this error. I’m just popping my solution here so hopefully, it will save others sometime! I’ve just adapt the script found on wxPython to work nicely with pipenv.
I create a wrapped
python.sh
script with the following…Then after
chmod +x python.sh
it, I run use it as a drop in replacement forpipenv run python
, e.g../python.sh app.py
Here is another
python.sh
helper for running a framework version (install withPYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install x.x.x
as instructed in matplotlib documentation) of python installed with pyenv:Works as the script in the above comment.