Opened 12 years ago

Closed 12 years ago

#38382 closed defect (invalid)

python_select: python27 cannot be selected

Reported by: glen@… Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: base Version: 2.1.3
Keywords: Cc:
Port: python_select

Description

port select does not work when selecting python27:

$ sudo port select python python27
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
Password:
Selecting 'python27' for 'python' failed: could not create new link "/opt/local/bin/python": target "/opt/local/bin/python2.7" doesn't exist

$ ls /opt/local/bin/python2.7
/opt/local/bin/python2.7

$ port installed python*
The following ports are currently installed:
  python27 @2.7.3_1 (active)
  python_select @0.3_2 (active)

However, selecting other port variants works:

$ sudo port select virtualenv virtualenv27
Selecting 'virtualenv27' for 'virtualenv' succeeded. 'virtualenv27' is now active.

Change History (8)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: select python removed
Owner: changed from macports-tickets@… to raimue@…
Port: python_select added
Summary: python27 cannot be selectedpython_select: python27 cannot be selected

Could you show us debug output please? It might shed some light.

sudo port -d select python python27

comment:2 Changed 12 years ago by glen@…

$ sudo port -d select python python27
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
Password:
DEBUG: Copying /Users/ghenshaw/Library/Preferences/com.apple.dt.Xcode.plist to /opt/local/var/macports/home/Library/Preferences
DEBUG: action_select [python python27] []...
DEBUG: Although no command was specified, more than one argument was specified.  Defaulting to the 'set' command...
DEBUG: mportselect [set] [python] [python27]
Selecting 'python27' for 'python' failed: could not create new link "/opt/local/bin/python": target "/opt/local/bin/python2.7" doesn't exist

comment:3 Changed 12 years ago by raimue (Rainer Müller)

Does /opt/local/bin/python2.7 exist? If not, your installation of python27 is incomplete and broken.

comment:4 Changed 12 years ago by glen@…

Yes, the target python exists (it also runs). See the original ticket:

$ ls /opt/local/bin/python2.7
/opt/local/bin/python2.7

$ port installed python*
The following ports are currently installed:
  python27 @2.7.3_1 (active)
  python_select @0.3_2 (active)

comment:5 Changed 12 years ago by raimue (Rainer Müller)

Sorry, I was not clear on that. python2.7 is supposed to be a symlink itself and I meant if the target of this symlink exists, like this:

$ ls -l /opt/local/bin/python2.7
lrwxr-xr-x  1 root  admin  73 Oct 26 17:09 /opt/local/bin/python2.7@ -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
$ ls -l /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
-rwxr-xr-x  1 root  wheel  25608 Oct 26 17:09 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7

comment:6 Changed 12 years ago by glen@…

My results:

$ ls -l /opt/local/bin/python2.7
lrwxr-xr-x  1 root  admin  6 Nov 20 12:09 /opt/local/bin/python2.7 -> python
$ ls -l /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
-rwxr-xr-x  1 root  wheel  9304 Oct 25 13:12 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7

comment:7 Changed 12 years ago by glen@…

After an uninstall, clean, and reinstall, I now get:

$ ls -l /opt/local/bin/python2.7
lrwxr-xr-x  1 root  admin  73 Nov 17 22:55 /opt/local/bin/python2.7 -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
$ ls -l /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
-rwxr-xr-x  1 root  wheel  9308 Nov 17 22:55 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7

and,

$ sudo port select python python27
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
Selecting 'python27' for 'python' succeeded. 'python27' is now active.

Thanks for the help. Dunno why the port was messed up originally.

comment:8 Changed 12 years ago by raimue (Rainer Müller)

Resolution: invalid
Status: newclosed

I am glad this could be resolved by a reinstall of python27. Thanks for the confirmation that this was the issue.

Note: See TracTickets for help on using tickets.