Opened 8 years ago

Closed 8 years ago

#50360 closed defect (worksforme)

py-spyder @2.3.7 - PyLint plugin reports "Please install pylint" in MacPorts Spyder when pylint is already installed

Reported by: nathan.artist@… Owned by: eborisch (Eric A. Borisch)
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc:
Port: py-spyder

Description

I installed Python 2.7.11 (port python27) and Spyder 2.3.7 (port py-spyder) and all its dependencies. The "Static code analysis" pane in Spyder reports "Please install pylint". But pylint 1.5.3 is already installed (port py27-pylint), and pylint is listed in the "Online help" pane (pydoc). There are symlinks at /opt/local/bin/pylint and /opt/local/bin/pylint-2.7 and both are in my PATH. Everything else except pylint appears to be working in Spyder.

I reported this problem in the Spyder issue tracker and was told that this is something for the MacPorts maintainers to solve; see https://github.com/spyder-ide/spyder/issues/2933

MacPorts 2.3.3, Xcode 6.2, OS X 10.9.5

Change History (6)

comment:1 Changed 8 years ago by eborisch (Eric A. Borisch)

Hmm. It's working for me. Two questions:

  1. Output of port contents py27-pylint | grep pylint-2.7
  2. Output of os.environ['PATH'] run in a console within Spyder?

comment:2 in reply to:  1 Changed 8 years ago by nathan.artist@…

Replying to eborisch@…:

Hmm. It's working for me. Two questions:

  1. Output of port contents py27-pylint | grep pylint-2.7
  2. Output of os.environ['PATH'] run in a console within Spyder?

Oh no! I discovered, after answering your second question, that pylint was not in my path (although I thought it was), and I realized how to fix the problem. Thanks for the help, and please close this ticket. I'll explain more below for anyone else who encounters this issue.

  1. Output of port contents py27-pylint | grep pylint-2.7:
    /opt/local/bin/epylint-2.7
    /opt/local/bin/pylint-2.7
    
  1. Output of os.environ['PATH'] run in a console within Spyder:
    '/usr/bin:/bin:/usr/sbin:/sbin'
    

The principal cause of my problem was that I was not starting Spyder from the command line. Instead, I had made the following AppleScript application (with the official Spyder icon) to start Spyder from the Mac GUI (Finder, Launchpad, Spotlight, etc.):

try
  do shell script "/opt/local/bin/spyder > /dev/null 2>&1 &"
end try

What I just learned (and I did not know before) is that since I was not starting Spyder from the bash command line, the environment variables specified in my ~/.bash_profile were not being passed to Spyder. The solution was to emend the AppleScript application to "export PATH":

try
  do shell script "export PATH=/opt/local/bin:/opt/local/sbin:$PATH ; /opt/local/bin/spyder > /dev/null 2>&1 &"
end try

comment:3 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: eborisch@… openmaintainer@… removed
Keywords: spyder py-spyder pylint py-pylint removed
Owner: changed from macports-tickets@… to eborisch@…
Port: py27-spyder removed

comment:4 Changed 8 years ago by eborisch (Eric A. Borisch)

Resolution: fixed
Status: newclosed

I was hopeful that something along those lines was the issue. Glad to see it resolved.

comment:5 Changed 8 years ago by eborisch (Eric A. Borisch)

Resolution: fixed
Status: closedreopened

comment:6 Changed 8 years ago by eborisch (Eric A. Borisch)

Resolution: worksforme
Status: reopenedclosed

Setting to worksforme (rather than fixed) because we didn't need to change anything in the Portfile.

Note: See TracTickets for help on using tickets.