Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation error while installing in mac #35

Closed
bikee1235 opened this issue May 7, 2021 · 17 comments
Closed

Installation error while installing in mac #35

bikee1235 opened this issue May 7, 2021 · 17 comments

Comments

@bikee1235
Copy link

sbts-MacBook-Pro:pymobiledevice3-master nbt$ python3 -m pip install --user -U -e .
Obtaining file:///Users/sbts/Desktop/pymobiledevice3-master
Collecting M2Crypto
Using cached M2Crypto-0.37.1.tar.gz (1.2 MB)
Requirement already satisfied, skipping upgrade: construct>=2.9.29 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from pymobiledevice3==1.6.0) (2.10.56)
Requirement already satisfied, skipping upgrade: pyasn1 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from pymobiledevice3==1.6.0) (0.4.8)
Collecting termcolor
Using cached termcolor-1.1.0.tar.gz (3.9 kB)
Collecting click
Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting coloredlogs
Using cached coloredlogs-15.0-py2.py3-none-any.whl (45 kB)
Requirement already satisfied, skipping upgrade: IPython in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from pymobiledevice3==1.6.0) (7.21.0)
Collecting bpylist2>=4.0.1
Using cached bpylist2-4.0.1-py3-none-any.whl (30 kB)
Requirement already satisfied, skipping upgrade: pygments in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from pymobiledevice3==1.6.0) (2.8.0)
Collecting hexdump
Using cached hexdump-3.3.zip (12 kB)
Collecting arrow
Using cached arrow-1.1.0-py3-none-any.whl (58 kB)
Collecting daemonize
Using cached daemonize-2.5.0-py2.py3-none-any.whl (5.2 kB)
Requirement already satisfied, skipping upgrade: parameterized in /Users/nbt/Library/Python/3.9/lib/python/site-packages (from M2Crypto->pymobiledevice3==1.6.0) (0.8.1)
Collecting humanfriendly>=9.1
Using cached humanfriendly-9.1-py2.py3-none-any.whl (86 kB)
Requirement already satisfied, skipping upgrade: pexpect>4.3; sys_platform != "win32" in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from IPython->pymobiledevice3==1.6.0) (4.8.0)
Requirement already satisfied, skipping upgrade: appnope; sys_platform == "darwin" in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from IPython->pymobiledevice3==1.6.0) (0.1.2)
Requirement already satisfied, skipping upgrade: pickleshare in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from IPython->pymobiledevice3==1.6.0) (0.7.5)
Requirement already satisfied, skipping upgrade: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from IPython->pymobiledevice3==1.6.0) (3.0.16)
Requirement already satisfied, skipping upgrade: jedi>=0.16 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from IPython->pymobiledevice3==1.6.0) (0.18.0)
Requirement already satisfied, skipping upgrade: backcall in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from IPython->pymobiledevice3==1.6.0) (0.2.0)
Requirement already satisfied, skipping upgrade: setuptools>=18.5 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from IPython->pymobiledevice3==1.6.0) (49.2.1)
Requirement already satisfied, skipping upgrade: traitlets>=4.2 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from IPython->pymobiledevice3==1.6.0) (5.0.5)
Requirement already satisfied, skipping upgrade: decorator in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from IPython->pymobiledevice3==1.6.0) (4.4.2)
Requirement already satisfied, skipping upgrade: python-dateutil>=2.7.0 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from arrow->pymobiledevice3==1.6.0) (2.8.1)
Requirement already satisfied, skipping upgrade: ptyprocess>=0.5 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from pexpect>4.3; sys_platform != "win32"->IPython->pymobiledevice3==1.6.0) (0.7.0)
Requirement already satisfied, skipping upgrade: wcwidth in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->IPython->pymobiledevice3==1.6.0) (0.2.5)
Requirement already satisfied, skipping upgrade: parso<0.9.0,>=0.8.0 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from jedi>=0.16->IPython->pymobiledevice3==1.6.0) (0.8.1)
Requirement already satisfied, skipping upgrade: ipython-genutils in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from traitlets>=4.2->IPython->pymobiledevice3==1.6.0) (0.2.0)
Requirement already satisfied, skipping upgrade: six>=1.5 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from python-dateutil>=2.7.0->arrow->pymobiledevice3==1.6.0) (1.15.0)
Using legacy 'setup.py install' for M2Crypto, since package 'wheel' is not installed.
Using legacy 'setup.py install' for termcolor, since package 'wheel' is not installed.
Using legacy 'setup.py install' for hexdump, since package 'wheel' is not installed.
Installing collected packages: M2Crypto, termcolor, click, humanfriendly, coloredlogs, bpylist2, hexdump, arrow, daemonize, pymobiledevice3
Running setup.py install for M2Crypto ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/pj/7dh7v3g501z6jhrjh_9zljdw0000gn/T/pip-install-o8t69hjp/m2crypto/setup.py'"'"'; file='"'"'/private/var/folders/pj/7dh7v3g501z6jhrjh_9zljdw0000gn/T/pip-install-o8t69hjp/m2crypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/pj/7dh7v3g501z6jhrjh_9zljdw0000gn/T/pip-record-k6l92jva/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/nbt/Library/Python/3.9/include/python3.9/M2Crypto
cwd: /private/var/folders/pj/7dh7v3g501z6jhrjh_9zljdw0000gn/T/pip-install-o8t69hjp/m2crypto/
Complete output (53 lines):
running install
running build
running build_py
copying M2Crypto/callback.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/EVP.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/AuthCookie.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/m2.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/ftpslib.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/EC.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/httpslib.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/X509.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/util.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/RSA.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/BIO.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/DH.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/init.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/threading.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/Rand.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/SMIME.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/Engine.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/m2xmlrpclib.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/RC4.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/m2urllib2.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/DSA.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/six.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/m2urllib.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/BN.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/m2crypto.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/Err.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/ASN1.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
creating build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
copying M2Crypto/SSL/cb.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
copying M2Crypto/SSL/Session.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
copying M2Crypto/SSL/timeout.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
copying M2Crypto/SSL/init.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
copying M2Crypto/SSL/TwistedProtocolWrapper.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
copying M2Crypto/SSL/Cipher.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
copying M2Crypto/SSL/Connection.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
copying M2Crypto/SSL/Context.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
copying M2Crypto/SSL/SSLServer.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
copying M2Crypto/SSL/ssl_dispatcher.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
copying M2Crypto/SSL/Checker.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
running build_ext
building 'M2Crypto._m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig -python -py3 -I/usr/local/include -I/Applications/Xcode_11.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.3/include -I/Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/Applications/Xcode_11.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory) -I/usr/local/include -I/Applications/Xcode_11.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.3/include -I/Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/Applications/Xcode_11.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory) -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/usr/include/openssl -includeall -modern -builtin -outdir /private/var/folders/pj/7dh7v3g501z6jhrjh_9zljdw0000gn/T/pip-install-o8t69hjp/m2crypto/M2Crypto -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
Deprecated command line option: -modern. This option is now always on.
SWIG/_m2crypto.i:62: Error: Unable to find 'openssl/opensslv.h'
SWIG/_m2crypto.i:68: Error: Unable to find 'openssl/safestack.h'
SWIG/_evp.i:12: Error: Unable to find 'openssl/opensslconf.h'
SWIG/_rc4.i:5: Error: Unable to find 'openssl/opensslconf.h'
SWIG/_ec.i:7: Error: Unable to find 'openssl/opensslconf.h'
error: command '/usr/local/bin/swig' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/pj/7dh7v3g501z6jhrjh_9zljdw0000gn/T/pip-install-o8t69hjp/m2crypto/setup.py'"'"'; file='"'"'/private/var/folders/pj/7dh7v3g501z6jhrjh_9zljdw0000gn/T/pip-install-o8t69hjp/m2crypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/pj/7dh7v3g501z6jhrjh_9zljdw0000gn/T/pip-record-k6l92jva/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/nbt/Library/Python/3.9/include/python3.9/M2Crypto Check the logs for full command output.

I am getting this error while running

python3 -m pip install --user -U -e .

command

@doronz88
Copy link
Owner

doronz88 commented May 7, 2021

M2crypto is known to this error on mac. Please follow the instructions in the Readme as for how to install it.

https://github.com/doronz88/pymobiledevice3#installation

@rahul-1485
Copy link

Hi @doronz88 when i run "python3 -m pip install --user -U m2crypto" for installation it is giving below error in mac please check.
Installing collected packages: m2crypto
WARNING: Value for scheme.platlib does not match. Please report this to pypa/pip#9617
distutils: /Users/Rahul/Library/Python/3.9/lib/python/site-packages
sysconfig: /Users/Rahul/Library/Python/3.9/lib/python3.9/site-packages
WARNING: Value for scheme.purelib does not match. Please report this to pypa/pip#9617
distutils: /Users/Rahul/Library/Python/3.9/lib/python/site-packages
sysconfig: /Users/Rahul/Library/Python/3.9/lib/python3.9/site-packages
WARNING: Additional context:
user = True
home = None
root = None
prefix = None
Running setup.py install for m2crypto ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/w1/vt706fh542x2hgb370r22n2r0000gn/T/pip-install-5xszfwjp/m2crypto_2edb858b41c0455bb658265164ca15a6/setup.py'"'"'; file='"'"'/private/var/folders/w1/vt706fh542x2hgb370r22n2r0000gn/T/pip-install-5xszfwjp/m2crypto_2edb858b41c0455bb658265164ca15a6/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/w1/vt706fh542x2hgb370r22n2r0000gn/T/pip-record-52d0bw17/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/Rahul/Library/Python/3.9/include/python3.9/m2crypto
cwd: /private/var/folders/w1/vt706fh542x2hgb370r22n2r0000gn/T/pip-install-5xszfwjp/m2crypto_2edb858b41c0455bb658265164ca15a6/
Complete output (53 lines):
running install
running build
running build_py
copying M2Crypto/callback.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/EVP.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/AuthCookie.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/m2.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/ftpslib.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/EC.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/httpslib.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/X509.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/util.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/RSA.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/BIO.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/DH.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/init.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/threading.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/Rand.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/SMIME.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/Engine.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/m2xmlrpclib.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/RC4.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/m2urllib2.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/DSA.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/six.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/m2urllib.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/BN.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/m2crypto.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/Err.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
copying M2Crypto/ASN1.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto
creating build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
copying M2Crypto/SSL/cb.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
copying M2Crypto/SSL/Session.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
copying M2Crypto/SSL/timeout.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
copying M2Crypto/SSL/init.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
copying M2Crypto/SSL/TwistedProtocolWrapper.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
copying M2Crypto/SSL/Cipher.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
copying M2Crypto/SSL/Connection.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
copying M2Crypto/SSL/Context.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
copying M2Crypto/SSL/SSLServer.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
copying M2Crypto/SSL/ssl_dispatcher.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
copying M2Crypto/SSL/Checker.py -> build/lib.macosx-10.9-x86_64-3.9/M2Crypto/SSL
running build_ext
building 'M2Crypto._m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig -python -py3 -I/usr/local/include -I/Users/Rahul/Desktop/Softwares/Xcodes/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Users/Rahul/Desktop/Softwares/Xcodes/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory) -I/usr/local/include -I/Users/Rahul/Desktop/Softwares/Xcodes/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Users/Rahul/Desktop/Softwares/Xcodes/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory) -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/usr/include/openssl -includeall -modern -builtin -outdir /private/var/folders/w1/vt706fh542x2hgb370r22n2r0000gn/T/pip-install-5xszfwjp/m2crypto_2edb858b41c0455bb658265164ca15a6/M2Crypto -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
Deprecated command line option: -modern. This option is now always on.
SWIG/_m2crypto.i:62: Error: Unable to find 'openssl/opensslv.h'
SWIG/_m2crypto.i:68: Error: Unable to find 'openssl/safestack.h'
SWIG/_evp.i:12: Error: Unable to find 'openssl/opensslconf.h'
SWIG/_rc4.i:5: Error: Unable to find 'openssl/opensslconf.h'
SWIG/_ec.i:7: Error: Unable to find 'openssl/opensslconf.h'
error: command '/usr/local/bin/swig' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/w1/vt706fh542x2hgb370r22n2r0000gn/T/pip-install-5xszfwjp/m2crypto_2edb858b41c0455bb658265164ca15a6/setup.py'"'"'; file='"'"'/private/var/folders/w1/vt706fh542x2hgb370r22n2r0000gn/T/pip-install-5xszfwjp/m2crypto_2edb858b41c0455bb658265164ca15a6/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/w1/vt706fh542x2hgb370r22n2r0000gn/T/pip-record-52d0bw17/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/Rahul/Library/Python/3.9/include/python3.9/m2crypto Check the logs for full command output.

@doronz88
Copy link
Owner

doronz88 commented May 7, 2021

As it says in the installation, the correct command for installing m2crypto is:

env LDFLAGS="-L$(brew --prefix openssl)/lib" \
CFLAGS="-I$(brew --prefix openssl)/include" \
SWIG_FEATURES="-cpperraswarn -includeall -I$(brew --prefix openssl)/include" \
python3 -m pip install --user -U m2crypto

This is a multi-line command that should work if you copy it to terminal as-is.
The simple: python3 -m pip install --user -U m2crypto isn't enough.

You must supply with the correct enviornment variables.

This is solution is taken from here:
https://gist.github.com/andrisasuke/91eccace11366e626d14c5c249054e20

@rahul-1485
Copy link

Hi @doronz88 the installation issue is resolved but i move to "pymobiledevice3" folder run "pymobiledevice3 --help" it shows command not found error

zsh: command not found: pymobiledevice3

But i have made entry in ~/.zshrc file.

Screenshot 2021-05-08 at 1 43 40 AM

@doronz88
Copy link
Owner

doronz88 commented May 7, 2021

Most likely your python binary directory isn't located in your PATH:
Assuming you're using python3.9, you should add the following to your ~/.zshrc:

export PATH=$PATH:~/Library/Python/3.9/bin

Alternatively, if you don't want to modify it, you can run it as a module (but it's less fun) using: python3 -m pymobiledevice3

@rahul-1485
Copy link

hi @doronz88 thanks for help now when i run commands like python3 -m "pymobiledevice3 list-devices" or "python3 -m pymobiledevice3 list-devices" it shows below error. I am running it on IOS 12.5.2

WARNING No iTunes pairing record found for device caf07925fafe65912231d022bcb889d9c38503d5
2021-05-08 02:03:59 Apples-MBP-2.domain.name pymobiledevice3.lockdown[10795] WARNING Looking for pymobiledevice3 pairing record
2021-05-08 02:03:59 Apples-MBP-2.domain.name pymobiledevice3.lockdown[10795] ERROR No pymobiledevice3 pairing record found for device caf07925fafe65912231d022bcb889d9c38503d5
2021-05-08 02:03:59 Apples-MBP-2.domain.name pymobiledevice3.lockdown[10795] INFO Creating host key & certificate
......................................................................................+++++
..........................................................................+++++
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/Rahul/Downloads/pymobiledevice3-master/pymobiledevice3/main.py", line 39, in
cli()
File "/Users/Rahul/Downloads/pymobiledevice3-master/pymobiledevice3/main.py", line 35, in cli
cli_commands()
File "/Users/Rahul/Library/Python/3.9/lib/python/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/Users/Rahul/Library/Python/3.9/lib/python/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/Rahul/Library/Python/3.9/lib/python/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/Rahul/Library/Python/3.9/lib/python/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/Rahul/Library/Python/3.9/lib/python/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/Users/Rahul/Downloads/pymobiledevice3-master/pymobiledevice3/cli/list_devices.py", line 23, in list_devices
lockdown = LockdownClient(udid)
File "/Users/Rahul/Downloads/pymobiledevice3-master/pymobiledevice3/lockdown.py", line 103, in init
self.pair()
File "/Users/Rahul/Downloads/pymobiledevice3-master/pymobiledevice3/lockdown.py", line 226, in pair
cert_pem, private_key_pem, device_certificate = ca_do_everything(self.device_public_key)
File "/Users/Rahul/Downloads/pymobiledevice3-master/pymobiledevice3/ca.py", line 118, in ca_do_everything
cert = make_cert(req, privateKey)
File "/Users/Rahul/Downloads/pymobiledevice3-master/pymobiledevice3/ca.py", line 87, in make_cert
certificate.set_serial_number(ASN1.m2.asn1_integer_new(1))
TypeError: M2Crypto._m2crypto.asn1_integer_new() takes no arguments (1 given)

@doronz88
Copy link
Owner

doronz88 commented May 7, 2021

It seems you are using an iOS version < 13.0 which I haven't tested it on. I have pushed a fix that might solve it. I don't have a device with the correct version to test it myself.

@rahul-1485
Copy link

Hi @doronz88 i have taken the latest checkout for IOS 12.5.2 i am getting below error on running command python3 -m pymobiledevice3 apps list.

python3 -m pymobiledevice3 developer applist

apple@Apples-MBP-2 pymobiledevice3 % python3 -m pymobiledevice3 developer applist
2021-05-08 14:33:24 Apples-MBP-2.domain.name root[2157] WARNING No iTunes pairing record found for device caf07925fafe65912231d022bcb889d9c38503d5
2021-05-08 14:33:24 Apples-MBP-2.domain.name pymobiledevice3.lockdown[2157] WARNING Looking for pymobiledevice3 pairing record
2021-05-08 14:33:24 Apples-MBP-2.domain.name pymobiledevice3.lockdown[2157] ERROR No pymobiledevice3 pairing record found for device caf07925fafe65912231d022bcb889d9c38503d5
2021-05-08 14:33:24 Apples-MBP-2.domain.name pymobiledevice3.lockdown[2157] INFO Creating host key & certificate
........+++++
.....................................+++++
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/Rahul/Desktop/pCloud/pymobiledevice3/pymobiledevice3/main.py", line 39, in
cli()
File "/Users/Rahul/Desktop/pCloud/pymobiledevice3/pymobiledevice3/main.py", line 35, in cli
cli_commands()
File "/Users/Rahul/Library/Python/3.9/lib/python/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/Users/Rahul/Library/Python/3.9/lib/python/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/Rahul/Library/Python/3.9/lib/python/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/Rahul/Library/Python/3.9/lib/python/site-packages/click/core.py", line 1257, in invoke
sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)
File "/Users/Rahul/Library/Python/3.9/lib/python/site-packages/click/core.py", line 700, in make_context
self.parse_args(ctx, args)
File "/Users/Rahul/Library/Python/3.9/lib/python/site-packages/click/core.py", line 1048, in parse_args
value, args = param.handle_parse_result(ctx, opts, args)
File "/Users/Rahul/Library/Python/3.9/lib/python/site-packages/click/core.py", line 1630, in handle_parse_result
value = invoke_param_callback(self.callback, ctx, self, value)
File "/Users/Rahul/Library/Python/3.9/lib/python/site-packages/click/core.py", line 123, in invoke_param_callback
return callback(ctx, param, value)
File "/Users/Rahul/Desktop/pCloud/pymobiledevice3/pymobiledevice3/cli/cli_common.py", line 26, in udid
return LockdownClient(udid=value)
File "/Users/Rahul/Desktop/pCloud/pymobiledevice3/pymobiledevice3/lockdown.py", line 103, in init
self.pair()
File "/Users/Rahul/Desktop/pCloud/pymobiledevice3/pymobiledevice3/lockdown.py", line 226, in pair
cert_pem, private_key_pem, device_certificate = ca_do_everything(self.device_public_key)
File "/Users/Rahul/Desktop/pCloud/pymobiledevice3/pymobiledevice3/ca.py", line 118, in ca_do_everything
cert = make_cert(req, privateKey)
File "/Users/Rahul/Desktop/pCloud/pymobiledevice3/pymobiledevice3/ca.py", line 91, in make_cert
issuer['CN'] = 'The Issuer Monkey'
TypeError: 'X509_Name' object does not support item assignment

For IOS 14

Commands are working.

@doronz88
Copy link
Owner

doronz88 commented May 8, 2021

I pushed a fix for this error. Please update if the issue is resolved

@rahul-1485
Copy link

Hi @doronz88 i have taken the latest pull of code but for IOS 12.5.2 i am getting the same error.

Screenshot 2021-05-08 at 7 42 36 PM

@doronz88
Copy link
Owner

doronz88 commented May 8, 2021

This is an entirely different error and should now be fixed

@rahul-1485
Copy link

Hi @doronz88 i have taken the latest pull of code and getting the below error.

Screenshot 2021-05-09 at 1 02 27 PM

Screenshot 2021-05-09 at 12 57 35 PM

@doronz88
Copy link
Owner

doronz88 commented May 9, 2021

Unfortunately, this is an error I cannot solve without debugging a real iOS 12 device. I'll leave this issue open until I get one to debug and solve or someone opens a PR for this.

Thanks for reporting!

@rahul-1485
Copy link

Hi @doronz88 i have taken the latest pull of repo and when i run the commands on IOS 14 device it is showing error. It was running fine for IOS 14 devices earlier is there anything changed. Please check.
Screenshot 2021-05-12 at 12 23 41 AM

@doronz88
Copy link
Owner

doronz88 commented May 11, 2021

The required service isn't running. Probably because you haven't yet mounted the DeveloperDiskImage.
You can do so using:

pymobiledevice3 mounter mount

And also verify it's mounted (supported on ios14.x):

pymobiledevice3 mounter list

This is required for every subcommand of developer.

Also, to display apps you need to specify which ones (user/system). for example:

pymobiledevice3 apps list --system

I'm closing this issue since the problem in the topic was already solved and the issues you are getting are non-related and are a matter of how-to-use. Feel free to create new issues, discussions or contact us on gitter if it's just a matter of getting help for using the tool (https://gitter.im/pymobiledevice3/community).

@rahul-1485
Copy link

Hi @doronz88 did you fix the issue for devices IOS version lower than 14. What is the minimum IOS version you are supporting.

@doronz88
Copy link
Owner

I've tested it on a 13.3 device and I believe it should work well for 13.0 and above.
Please open a new issue describing the errors (backtrace) you encountered when using lower versions.
I cannot debug the issue myself since I don't have a device with an older os version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants