altstoreio / AltStore

AltStore is an alternative app store for non-jailbroken iOS devices.
https://altstore.io
GNU Affero General Public License v3.0
11.32k stars 858 forks source link

error: externally-managed-environment #1398

Open Piipperi opened 3 months ago

Piipperi commented 3 months ago

Trying to get JIT working using the guide (https://faq.altstore.io/how-to-use-altstore/altjit), but I keep running into an error:

python3 -m pip install pymobiledevice3==2.30.0 construct==2.10.69
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try brew install
    xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-brew-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip.

    If you wish to install a non-brew packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

Either the guide needs updating, or I'm just doing something entirely wrong…

Using macOS 14.4 (23E214) (x64). Enabling JIT currently gives an error The process 'altjit' failed with code 1. Could not connect to device 00008103-001E75381A79001E. The process 'python3' returned unexpected output. Error: No such command 'start-quic-tunnel'.

shim80 commented 3 months ago

Same here

bbqthis commented 3 months ago

Same here

Janov911 commented 2 months ago

same here

azataiot commented 2 months ago

After failing with installing through the guided python3 -m pip install -U pymobiledevice3==2.30.0 command, i managed to install the pymobiledevice3==2.30.0 successfully through pipx,

pymobiledevice3 -h
Usage: pymobiledevice3 [OPTIONS] COMMAND [ARGS]...

Options:
  -h, --help  Show this message and exit.

Commands:
  activation       activation options
  afc              FileSystem utils
  amfi             amfi options
  apps             application options
  backup2          backup utils
  bonjour          bonjour options
  companion        companion options
  crash            crash report options
  developer        developer options.
  diagnostics      diagnostics options
  lockdown         lockdown options
  mounter          mounter options
  notification     notification options
  pcap             sniff device traffic
  power-assertion  Create a power assertion (wraps...
  processes        processes cli
  profile          profile options
  provision        privision options
  remote           remote options
  restore          restore options
  springboard      springboard options
  syslog           syslog options
  usbmux           usbmuxd options
  webinspector     webinspector options

now on my mac, pymobiledevice3 is present and can be called directly, but when i try to enable jit on alt server, it still complains that i do not have the dependency pymobiledevice3,

CleanShot 2024-04-24 at 09 53 25

b8rry commented 2 months ago

also having this issue

Kameeno commented 1 month ago

same thing here. dont get how to fix it

andrewgribben commented 1 month ago

python3 -m pip install -U --break-system-packages pymobiledevice3==2.30.0 will work

yeweiyang96 commented 1 month ago

python3 -m pip install -U --break-system-packages pymobiledevice3==2.30.0 will work

it still complains that i do not have the dependency pymobiledevice3.

python3 -m pip list Package Version


pymobiledevice3 2.30.0

yeweiyang96 commented 1 month ago

I fixed it.

/Applications/Xcode.app/Contents/Developer/usr/bin/python3 -m pip install -U pymobiledevice3==2.30.0

Because I found /Applications/Xcode.app/Contents/Developer/usr/bin/python3 version is 3.9. my "python3" is 3.12

J7mbo commented 1 week ago

Also having this issue. Running

/Applications/Xcode.app/Contents/Developer/usr/bin/python3 -m pip install -U pymobiledevice3==2.30.0

Pointed me in the right direction, as now I get the stream.tell() failed error:

The version of pymobiledevice3 you are using is not currently working with AltServer. Please run the following command to install the last compatible version:

So I ran it with the missing construct:

/Applications/Xcode.app/Contents/Developer/usr/bin/python3 -m pip install -U pymobiledevice3==2.30.0 construct==2.10.69

This took me to a PUBLIC_KEY error (once unlocked) as described here:

https://github.com/altstoreio/AltStore/issues/1380

Followed this rabbit hole down here: https://gist.github.com/tonycoco/66b08eea237ff64bf7becb54afb2e04d

Then got the error:

The process 'python3' returned unexpected output. KeyError: <Epoch.INITIAL: 0>

Which led me to this: https://www.reddit.com/r/AltStore/comments/1c823ck/keyerror_epochinitial_0_when_trying_to_enable_jit/

python3 -m pip install -U --break-system-packages pymobiledevice3==2.30.0 construct==2.10.69 qh3==0.15.1

Then trying:

/Applications/Xcode.app/Contents/Developer/usr/bin/python3 -m pip install -U pymobiledevice3==2.30.0 construct==2.10.69 qh3==0.15.1

And then, making sure lldb was detached:

image

What a shitshow.