indygreg / indygreg/PyOxidizer

Error during "Getting Started"

Open
#286 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

need-info
Dominant language
Rust
Stars
6.2k
Forks
256
PR merge metrics
No merged PRs in 30d

Description

MacOS - Catalina 10.15.6

https://pyoxidizer.readthedocs.io/en/latest/getting_started.html

First I installed as follows, it installed 0.7.0 but apparently doesn't know that itself...

% brew install rust
% brew install rustup
% cargo install pyoxidizer
% pyoxidizer

PyOxidizer UNKNOWN
Gregory Szorc <gregory.szorc@gmail.com>
Build and distribute Python applications

USAGE:
    pyoxidizer [FLAGS] [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information
        --verbose    Enable verbose output

SUBCOMMANDS:
    add                             Add PyOxidizer to an existing Rust project. (EXPERIMENTAL)
    analyze                         Analyze a built binary
    build                           Build a PyOxidizer enabled project
    help                            Prints this message or the help of the given subcommand(s)
    init-config-file                Create a new PyOxidizer configuration file.
    init-rust-project               Create a new Rust project embedding a Python interpreter
    list-targets                    List targets available to resolve in a configuration file
    python-distribution-extract     Extract a Python distribution archive to a directory
    python-distribution-info        Show information about a Python distribution archive
    python-distribution-licenses    Show licenses for a given Python distribution
    run                             Run a target in a PyOxidizer configuration file
    run-build-script                Run functionality that a build script would perform

Then I tried the interactive prompt, which worked...

pyoxidizer init-config-file pyapp
cd pyapp
pyoxidizer run

Then I tried adding run_eval="import uuid; print(uuid.uuid4())", which also worked.

At the next step I got the error... Change the line above to run_eval="from pyflakes.api import main; main()", and then add the line exe.add_in_memory_python_resources(exe.pip_install(["pyflakes==2.1.1"]))

When run, I get the following message...

resolving 1 targets
resolving target exe
resolving target dist
resolving Python distribution Url { url: "https://github.com/indygreg/python-build-standalone/releases/download/20200408/cpython-3.7.7-macos-20200409T0412.tar.zst", sha256: "f312bea46a7d8efecd4df6b22c03f83016775e6bb5944a5701d697e0a52c63b2" }
Python distribution available at /Users/mathew.bailie/Documents/repo/pyapp/./build/python_distributions/cpython-3.7.7-macos-20200409T0412.tar.zst
reading data from Python distribution...
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
error[CV00]: Cannot .pip_install on type PythonExecutable
   --> ./pyoxidizer.bzl:116:40
    |
116 |     exe.add_in_memory_python_resources(exe.pip_install(["pyflakes==2.1.1"]))
    |                                        ^^^^^^^^^^^^^^^ .pip_install not supported for type PythonExecutable


error: Cannot .pip_install on type PythonExecutable

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Getting Started steps on macOS Catalina, including the pyflakes installation command, then inspect pyoxidizer.bzl at line 116 and the linked Getting Started documentation. Check why pip_install is called on a PythonExecutable and verify the documented workflow completes and runs the pyflakes example successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
documentation, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.