[MacPorts] #51695: could not use setup.py to install pyraf using the macports installation of python 2.7

MacPorts noreply at macports.org
Thu Jun 23 04:18:36 PDT 2016


#51695: could not use setup.py to install pyraf using the macports installation of
python 2.7
-------------------------------+--------------------------------
  Reporter:  mahajan.smriti@…  |      Owner:  macports-tickets@…
      Type:  defect            |     Status:  new
  Priority:  Normal            |  Milestone:
 Component:  ports             |    Version:  2.3.4
Resolution:                    |   Keywords:
      Port:                    |
-------------------------------+--------------------------------

Comment (by ryandesign@…):

 Replying to [comment:2 mahajan.smriti@…]:
 > I have Xcode version 5.1.1 installed.

 Ok, good, that's a supported version for OS X 10.9. You could update to as
 new a version as 6.2 if you wanted to.

 > Also which gcc returns /usr/bin/gcc.

 That is normal. You should find that if you run `gcc --version`, it
 informs you that it is not in fact gcc but actually clang.

 > I am sure I am using the Macports python, because I have explicitly set
 the path to it in the .profile file using
 > alias python='/opt/local/bin/python2.7'. I have to admit though that I
 do have other installations of Python 2.7 on my laptop, which perhaps came
 in bundled with other packages I installed earlier, but I do not know how
 to get rid of them to clean up the system.

 Ok. Instead of setting an alias in your .profile, you could instead use
 `sudo port select python python27`.

 > I tried using CC=clang python setup.py pip install pyraf
 >
 > but that returns
 >
 > {{{
 >
 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python:
 can't open file 'setup.py': [Errno 2] No such file or directory
 > }}}

 This means there is no file called setup.py in the current directory.

 > Not sure though why it is searching for setup.py in the /Frameworks/..
 directory tree, when I have specified which Python I want to use.

 It's not searching for setup.py in the /Frameworks/.. directory tree.
 Rather, /opt/local/bin/python2.7 is a symlink to
 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python.
 So python is merely printing its full path for you.

 It looks like you're getting confused about how to install python modules.
 You can either download the source code and run the setup.py file
 contained therein, or you can use pip to install it for you; you don't do
 both. Check the
 [http://www.stsci.edu/institute/software_hardware/pyraf/pyraf_install_src
 pyraf installation instructions].

-- 
Ticket URL: <https://trac.macports.org/ticket/51695#comment:3>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list