Giter Club home page Giter Club logo

Comments (33)

vbabiy avatar vbabiy commented on May 12, 2024
  • Changed title from install_name_tool breaks on 64-bit 2.7 to
    install_name_tool breaks on 64-bit Python 2.7.

Original Comment By: Sridhar Ratnakumar

from virtualenv.

vbabiy avatar vbabiy commented on May 12, 2024
  • Changed content.

Original Comment By: Sridhar Ratnakumar

from virtualenv.

vbabiy avatar vbabiy commented on May 12, 2024
  • Changed title from install_name_tool breaks on 64-bit Python 2.7 to mac:
    install_name_tool breaks on 64-bit Python 2.7.

Original Comment By: Sridhar Ratnakumar

from virtualenv.

vbabiy avatar vbabiy commented on May 12, 2024
  • Changed title from mac: install_name_tool breaks on 64-bit Python 2.7 to
    mac: install_name_tool breaks on 64-bit Python 2.7 | Leopard only.

Original Comment By: Sridhar Ratnakumar

from virtualenv.

vbabiy avatar vbabiy commented on May 12, 2024
  • Changed content.

Original Comment By: Sridhar Ratnakumar

from virtualenv.

vbabiy avatar vbabiy commented on May 12, 2024
  • Changed content.

Original Comment By: Sridhar Ratnakumar

from virtualenv.

vbabiy avatar vbabiy commented on May 12, 2024

I wasn't able to reproduce this but might be related to what was done in
[Author: jezdez

Age: 8 months ago

Fixed 32 - Partially reverted the changes made in r03bf4040094c to fix setting
up cross Python version virtualenv.">r312:4f8d56657fd3]1 .


Original Comment By: Jannis Leidel

from virtualenv.

vbabiy avatar vbabiy commented on May 12, 2024

I just saw this on Python 2.6.6c2 built with 10.5 SDK --universal-intel
(i386+x86_64). On a Leopard machine.

@jezdez - was there a new release since that change? I have virtualenv 1.4.9
that has the following piece of code:

  1. Make sure we use the the embedded interpreter inside
  2. the framework, even if sys.executable points to
  3. the stub executable in ${sys.prefix}/bin
  4. See http://groups.google.com/group/python-virtualenv/
  5. browse_thread/thread/17cab2f85da75951 shutil.copy( os.path.join( prefix,
    'Resources/Python.app/Contents/MacOS/%s' % os.path.basename(sys.executable)),
    py_executable)

My sys.executable is Contents/MacOS/Python-32


Original Comment By: Sridhar Ratnakumar

from virtualenv.

vbabiy avatar vbabiy commented on May 12, 2024

@srid: No there wasn't a release since then, please try again with
virtualenv==dev.


Original Comment By: Jannis Leidel

from virtualenv.

vbabiy avatar vbabiy commented on May 12, 2024

@jezdez: I get the same error with virtualenv==dev. I also tried directly
using the tip
http://bitbucket.org/ianb/virtualenv/raw/590ef6e06a3d/virtualenv.py


Original Comment By: Sridhar Ratnakumar

from virtualenv.

vbabiy avatar vbabiy commented on May 12, 2024

@srid: Ok, thanks, reopening then.


Original Comment By: Jannis Leidel

from virtualenv.

vbabiy avatar vbabiy commented on May 12, 2024

I get the same thing in ActivePython 2.7.0.2 / OS X 10.5.8


Original Comment By: Anonymous

from virtualenv.

vbabiy avatar vbabiy commented on May 12, 2024

If anyone with access to Leopard would help out with this, it'd be much
appreciated.


Original Comment By: Jannis Leidel

from virtualenv.

vbabiy avatar vbabiy commented on May 12, 2024

The same error occurs on the Mac OS X Lion developer preview:

amcgregor@Hamaliel ~/Projects $ virtualenv --no-site-packages --distribute

Contentment

New python executable in Contentment/bin/python

install_name_tool: for architecture x86_64 object: Contentment/bin/python

malformed object (unknown load command 9)

Could not call install_name_tool -- you must have Apple's development

tools installed

Traceback (most recent call last):

  File "/usr/local/bin/virtualenv", line 9, in <module>

    load_entry_point('virtualenv==1.5.1', 'console_scripts',

'virtualenv')()

  File "/Library/Python/2.7/site-

packages/virtualenv-1.5.1-py2.7.egg/virtualenv.py", line 558, in main

    prompt=options.prompt)

  File "/Library/Python/2.7/site-

packages/virtualenv-1.5.1-py2.7.egg/virtualenv.py", line 647, in
create_environment

    site_packages=site_packages, clear=clear))

  File "/Library/Python/2.7/site-

packages/virtualenv-1.5.1-py2.7.egg/virtualenv.py", line 900, in
install_python

    py_executable])

  File "/Library/Python/2.7/site-

packages/virtualenv-1.5.1-py2.7.egg/virtualenv.py", line 624, in
call_subprocess

    % (cmd_desc, proc.returncode))

OSError: Command install_name_tool -change

/System/Library/Frameworks/Pyt...ython @executable_path/../.Python
Contentment/bin/python failed with error code 1

Testing again with virtualenv==dev results in the same failure using:

Python 2.7.1 (r271:86832, Feb  6 2011, 16:42:58)

[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.8)] on darwin

Original Comment By: Alice Bevan-McGregor

from virtualenv.

welchr avatar welchr commented on May 12, 2024

Same issue on OS X 10.6.8 with Python 2.6.1 using virtualenv 1.6.1:

New python executable in testenv/bin/python
Error [Errno 2] No such file or directory while executing command install_name_tool -change /System/Library/Fram.../Versions/2.6/Python @executable_path/../.Python testenv/bin/python
Could not call install_name_tool -- you must have Apple's development tools installed
Traceback (most recent call last):
File "virtualenv-1.6.1/virtualenv.py", line 1965, in
main()
File "virtualenv-1.6.1/virtualenv.py", line 795, in main
never_download=options.never_download)
File "virtualenv-1.6.1/virtualenv.py", line 886, in create_environment
site_packages=site_packages, clear=clear))
File "virtualenv-1.6.1/virtualenv.py", line 1150, in install_python
py_executable])
File "virtualenv-1.6.1/virtualenv.py", line 828, in call_subprocess
cwd=cwd, env=env)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 595, in init
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1106, in _execute_child
OSError: [Errno 2] No such file or directory

Looks like virtualenv doesn't work without the Apple developer tools?

from virtualenv.

jezdez avatar jezdez commented on May 12, 2024

Yeah, the developer tools are an dependency on Mac OS.

from virtualenv.

splee avatar splee commented on May 12, 2024

I am getting this using Lion (upgraded from Snow Leopard). I reinstalled Xcode and virtualenv to no avail:

$ mkvirtualenv pongdom
New python executable in pongdom/bin/python
install_name_tool: for architecture x86_64 object: pongdom/bin/python malformed object (unknown load command 9)
Could not call install_name_tool -- you must have Apple's development tools installed
Traceback (most recent call last):
  File "/usr/local/bin/virtualenv", line 8, in <module>
    load_entry_point('virtualenv==1.6.4', 'console_scripts', 'virtualenv')()
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 810, in main
    never_download=options.never_download)
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 901, in create_environment
    site_packages=site_packages, clear=clear))
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 1166, in install_python
    py_executable])
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 878, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command install_name_tool -change /System/Library/Fram.../Versions/2.7/Python @executable_path/../.Python pongdom/bin/python failed with error code 1

from virtualenv.

jezdez avatar jezdez commented on May 12, 2024

Which python did you use to run virtualenv and more importantly which python does virtualenv use? (see the first line of the virtualenv script)

The default Python version was upgrade from 2.6 to 2.7 so it might be possible that there is a stale virtualenv somewhere.

Note: I've upgraded myself from Snow Leopard to Lion on a 64bit machine and didn't encounter the described problem.

from virtualenv.

dedan avatar dedan commented on May 12, 2024

I have the same on a clean install of Lion. Installed everything from scratch and get the following error:

New python executable in pyff/bin/python
Error [Errno 2] No such file or directory while executing command install_name_tool -change /System/Library/Fram.../Versions/2.7/Python @executable_path/../.Python pyff/bin/python
Could not call install_name_tool -- you must have Apple's development tools installed
Traceback (most recent call last):
  File "/usr/local/bin/virtualenv", line 8, in <module>
    load_entry_point('virtualenv==1.6.4', 'console_scripts', 'virtualenv')()
  File "/Library/Python/2.7/site-packages/virtualenv-1.6.4-py2.7.egg/virtualenv.py", line 810, in main
    never_download=options.never_download)
  File "/Library/Python/2.7/site-packages/virtualenv-1.6.4-py2.7.egg/virtualenv.py", line 901, in create_environment
    site_packages=site_packages, clear=clear))
  File "/Library/Python/2.7/site-packages/virtualenv-1.6.4-py2.7.egg/virtualenv.py", line 1166, in install_python
    py_executable])
  File "/Library/Python/2.7/site-packages/virtualenv-1.6.4-py2.7.egg/virtualenv.py", line 843, in call_subprocess
    cwd=cwd, env=env)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 672, in __init__
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1202, in _execute_child
OSError: [Errno 2] No such file or directory

also on a 64 bit machine

from virtualenv.

bretth avatar bretth commented on May 12, 2024

Lion users - When you Install Xcode via the app store it's only installing the INSTALLER. You need to run the installer from applications to actually install Xcode.

Who would have thought that when the App store says installed it's not actually installed but there you go!

This of course solved the mystery of the missing install_name_tool

from virtualenv.

gorakhargosh avatar gorakhargosh commented on May 12, 2024

Umm. I have Xcode installed, but still no go. Weird. The funny part is it was working earlier. =
Here's the stacktrace:

_____________________________________________________________________________ [tox testenv:py27] ______________________________________________________________________________
[TOX] ***creating virtualenv py27
[TOX] /Volumes/data/Projects/mom/.tox$ /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 ../../../../../Library/Python/2.7/site-packages/tox/virtualenv.py --distribute --no-site-packages py27 >py27/log/0.log
[TOX] ERROR: invocation failed, logfile: /Volumes/data/Projects/mom/.tox/py27/log/0.log
[TOX] ERROR: /Volumes/data/Projects/mom/.tox$ /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 ../../../../../Library/Python/2.7/site-packages/tox/virtualenv.py --distribute --no-site-packages py27 >py27/log/0.log
install_name_tool: for architecture cputype (16777223) cpusubtype (-2147483645) object: py27/bin/python malformed object (unknown load command 4)
New python executable in py27/bin/python
Could not call install_name_tool -- you must have Apple's development tools installed
Traceback (most recent call last):
  File "../../../../../Library/Python/2.7/site-packages/tox/virtualenv.py", line 1922, in <module>
    main()
  File "../../../../../Library/Python/2.7/site-packages/tox/virtualenv.py", line 796, in main
    never_download=options.never_download)
  File "../../../../../Library/Python/2.7/site-packages/tox/virtualenv.py", line 887, in create_environment
    site_packages=site_packages, clear=clear))
  File "../../../../../Library/Python/2.7/site-packages/tox/virtualenv.py", line 1151, in install_python
    py_executable])
  File "../../../../../Library/Python/2.7/site-packages/tox/virtualenv.py", line 864, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command install_name_tool -change /System/Library/Fram.../Versions/2.7/Python @executable_path/../.Python py27/bin/python failed with error code 1

[TOX] ERROR: InvocationError: /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 ../../../../../Library/Python/2.7/site-packages/tox/virtualenv.py --distribute --no-site-packages py27 (see /Volumes/data/Projects/mom/.tox/py27/log/0.log)

from virtualenv.

shacker avatar shacker commented on May 12, 2024

bretth - Thank you! I never would have guessed that. Sheesh.

from virtualenv.

aidanlister avatar aidanlister commented on May 12, 2024

I'm experiencing this problem with Xcode installed also,

$ virtualenv --no-site-packages --distribute fiestagram
New python executable in fiestagram/bin/python
install_name_tool: object: fiestagram/bin/python malformed object (unknown load command 4)
Could not call install_name_tool -- you must have Apple's development tools installed
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenv", line 9, in <module>
    load_entry_point('virtualenv==1.5.2', 'console_scripts', 'virtualenv')()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.py", line 558, in main
    prompt=options.prompt)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.py", line 647, in create_environment
    site_packages=site_packages, clear=clear))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.py", line 901, in install_python
    py_executable])
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.py", line 624, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command install_name_tool -change /opt/local/Library/Frameworks/...ython @executable_path/../.Python fiestagram/bin/python failed with error code 1

This is using Python 2.7 from MacPorts as well as the native 2.7 in Snow Leopard.

from virtualenv.

fmeyer avatar fmeyer commented on May 12, 2024

After upgrade from snow leopard to Lion you should re-install Xcode.

from virtualenv.

aidanlister avatar aidanlister commented on May 12, 2024

I didn't upgrade, it's a new computer.

On 12 November 2011 05:27, Fernando Meyer
[email protected]
wrote:

After upgrade from snow leopard to Lion you should re-install Xcode.


Reply to this email directly or view it on GitHub:
#7 (comment)

from virtualenv.

lxyu avatar lxyu commented on May 12, 2024

Same problem here.

New python executable in pyramidenv/bin/python
install_name_tool: for architecture cputype (16777223) cpusubtype (-2147483645) object: pyramidenv/bin/python malformed object (unknown load command 4)
Could not call install_name_tool -- you must have Apple's development tools installed
Traceback (most recent call last):
  File "/usr/local/bin/virtualenv", line 8, in <module>
    load_entry_point('virtualenv==1.7', 'console_scripts', 'virtualenv')()
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 928, in main
    never_download=options.never_download)
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 1029, in create_environment
    site_packages=site_packages, clear=clear))
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 1296, in install_python
    py_executable])
  File "/Library/Python/2.7/site-packages/virtualenv.py", line 1006, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command install_name_tool -change /System/Library/Fram.../Versions/2.7/Python @executable_path/../.Python pyramidenv/bin/python failed with error code 1

But, the problem solved after I manually reinstalled the Xcode.

from virtualenv.

macdhuibh avatar macdhuibh commented on May 12, 2024

Although I have XCode installed and at one time virtualenv was working fine, it is no longer.
MacOS 10.6.6, MacPorts installed Python2.7. I have the same traceback as aidanlister.
My latest attempt was with a pip installed virtualenv 1.7.

from virtualenv.

macdhuibh avatar macdhuibh commented on May 12, 2024

After a little digging around I came across @gregglind's fork and feature/install_name_tool branch
https://github.com/gregglind/virtualenv/tree/feature/install_name_tool

I did the following and now virtualenv seems to be working just fine. YMMV

git clone https://github.com/gregglind/virtualenv.git
cd virtualenv
git checkout feature/install_name_tool
sudo python setup.py install

from virtualenv.

stancarney avatar stancarney commented on May 12, 2024

I had the same issue on Lion. Xcode was installed via the App Store but install_name_tool wasn't available until I downloaded and installed command_line_tools_for_xcode.dmg from developer.apple.com. All works well now.

from virtualenv.

gorakhargosh avatar gorakhargosh commented on May 12, 2024

@stancarney
Can you provide a link to that?

from virtualenv.

stancarney avatar stancarney commented on May 12, 2024

@gorakhargosh
I can't link right to it because you have to login to developer.apple.com with your Apple Id, but if you hit this URL and login the command line tools dmg for March is second from the top. https://developer.apple.com/downloads/index.action.

from virtualenv.

leetrout avatar leetrout commented on May 12, 2024

@stancarney +1 Great tip- Thank you!

I just upgraded from 10.6.8 to 10.7.3 and had the same install_name_tool error and installing the command line tools fixed it.

from virtualenv.

gaborbernat avatar gaborbernat commented on May 12, 2024

I think this should be fixed, we don't support Python 2.6 anymore but if you can reproduce it with 2.7+ open it again.

from virtualenv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.