New answers tagged

0

trying run Python 2.7.11 on X-Code 7.2 on OS X 10.11.2; I could not select 'python' under "Edit Scheme" > "Info" > "Executable" It was grayed out. I do not know what SIP means, but I got it to work by right-clicking the grayed out 'python' under usr/local/bin in the window and selecting "Quick Look" A box opened and I closed it and 'python' was now ...


0

When you click on "Other..." and the dialog window comes up, press shift-cmd-g. That will open a dialog box that lets you type a specific path. Just like going to a hidden directory in the Finder. I'm on 10.11.2 running Xcode 7.2, so in my case the python executable is in /usr/bin


0

Believe me, you don't really want the library to write anything at that path. It was previously not recommended, but possible to write into /System/Library/Frameworks/Python.framework/Versions/2.7/ , but now it's not supported due to Apple SIP and so it's the library owner problem. The package distribution should be upgraded to work correctly with this ...


2

You can check and see who owns the site-packages directory by using ls -l /Library/Python/2.7/ You'll get results similar to this: total 0 drwxr-xr-x 3 root wheel 102 Jan 13 17:58 site-packages The third column (that shows root above), shows the directory owner. In the above example, this directory is owned by root. I've seen similar errors related ...


3

On a Mac the loopback interface only has the 127.0.0.1 address configured. You could always add an alias to the IP you need: sudo ifconfig lo0 alias 127.0.0.123 Your python code worked for me then. To delete the alias do the following: sudo ifconfig lo0 -alias 127.0.0.123 To make this persistent over reboots create org.local.localhost.plist in ...


2

Sign up with Apple as a paid developer and you can use your Mac App signing certificate to sign that app before distributing it. Your Apple ID will then allow Apple to trace things back to you should you sign something malicious and it comes to their attention. You're looking for the Mac Provisioning Certificate that Apple will sign and deliver you you from ...


2

A very cool solution for this issue is using virtualenv (virtualenvwrapper), after you create a new environment for your project, you can use pip without issues, so I used virtualenvwrapper and these two lines fix the problem: mkproject <project_name> pip install <package_name>


0

After installing brew install pygame myself, it spit out this message: ==> python -c import setuptools... --no-user-cfg install --prefix=/usr/local/Cellar/pygame/1.9.2a0 --single-version-externally-managed --record=installed.txt ==> Caveats Python modules have been installed and Homebrew's site-packages is not in your Python sys.path, so you will not ...


1

The short answer, if you want to continue using the system version of Python, is to change your pip command to look like this: sudo -H pip install --install-option '--install-data=/usr/local' <package> The longer answer: It appears that Apple didn't quite finish the job setting distutils variables on El Capitan. On this OS (and maybe earlier ...



Top 50 recent answers are included