[PyQt] PyQt4 and PyCharm IDE

Zachary Scheuren angryjaga at gmail.com
Wed Jun 3 00:17:50 BST 2015


There seem to be some problems in the interpreter settings. I just checked
my home setup and PyQt doesn't show up in the list of packages, but PyCharm
reads it fine and I get autocomplete. Those settings have always been a
little weird. I believe that list only shows packages installed with
easy_install, but it should still read all locations set for the
interpreter (from the gear icon > "More..." and then the not so clear "Show
paths for selected interpreter" button). My PyQt4 is in
/Library/Python/2.7/site-packages and it works fine even though it doesn't
show in the interpreter settings.

In the interpreter settings you can add paths to the specific interpreter,
but that's also buggy. I have to add the same path a couple times. And
restart the app and double check that it actually saved it properly. On my
work Mac we load PyQt4 from a different location that's not in $PATH or
$PYTHONPATH, but I added that location to the PyCharm interpreter settings
and it also reads it fine.

Zachary

On Wed, Jun 3, 2015 at 5:59 AM Donald E Limbaugh <
delimbaugh21 at students.tntech.edu> wrote:

>  Not seeing it...  I removed the Python 2.7 interpreter & rescanned the
> system, but still no PyQt.
>
>
>
> Could it be the file path for my install of PyQt?  Here's what I see
> available for Project Interpreters:
>
>
>
> /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
>
>
>
> /System/Library/Frameworks/Python.framework/Versions/2.7/bin​​​​/python2.7
>
>
>
> /Users/myMac/anaconda/bin/python
>
>
>
> I'm not sure how this happened...  I guess my skills at installing things
> on my Mac are not very keen.
>
>
>
> I can ​​​see that my PyQt4 is installed in the directory
> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/PyQt4
>
>
>
> But when I have the select that directory in the Preferences -> Project
> Interpreter dialog, I only see a few Packages installed.  When I choose the
> anaconda interpreter, I see dozens of packages installed, but no PyQt...
>
>
>
> I'm very confused!  Maybe I should delete all things Python & start again!
>
>
>
>
>
>
>
>
>  ------------------------------
> *From:* PyQt <pyqt-bounces at riverbankcomputing.com> on behalf of Zachary
> Quinn Scheuren <angryjaga at gmail.com>
> *Sent:* Monday, June 1, 2015 12:45 PM
>
> *To:* pyqt at riverbankcomputing.com
> *Subject:* Re: [PyQt] PyQt4 and PyCharm IDE
>  It should see PyQt with the correct Python selected. It can be a little
> finicky sometimes, though. You could try to add a new interpreter from the
> settings wheel that's above the '+' button (that whole area of settings
> isn't as clear as it could be). There is the option to add local or remote
> Python versions or create a virtual Python. If it's already pointing at
> your installed Python then just delete that interpreter and add it again.
> That should force a rescan of the selected Python's packages.
>
>
> 2015/06/02 1:32、Donald E Limbaugh <delimbaugh21 at students.tntech.edu>
> のメッセージ:
>
>   Thanks, Zachary, for the quick response!!
>
>
>
> I am using Python 2.7.
>
>
>
> From the Preferences -> Project -> Project Interpreter settings, I see:
>
>
>
> pip
>
> setuptools
>
> wsgrief
>
> wxPython
>
> wxPython-common
>
>
>
> I don't see PyQt there.  I click on the '+' sign at the bottom to add it,
> but that just brings up the Available Packages dialog box where I can
> install PyQt.  I don't need to install it; it's already on my machine.  I
> don't see how to "direct" PyCharm to use the PyQt already available...
>
>
>
> Suggestions?
>
>
>
>
>
>
>
>
>  ------------------------------
> *From:* PyQt <pyqt-bounces at riverbankcomputing.com> on behalf of Zachary
> Quinn Scheuren <angryjaga at gmail.com>
> *Sent:* Monday, June 1, 2015 9:07 AM
> *To:* pyqt at riverbankcomputing.com
> *Subject:* Re: [PyQt] PyQt4 and PyCharm IDE
>
>  I use PyCharm on Mac, Linux and Windows with PyQt4 all day every day.
> You need to make sure your project interpreter is setup with the Python
> version you have PyQt installed for. You don't need it to be the same
> Python, though. You can also set the project interpreter to be virtual and
> make sure the virtual Python has the correct packages installed. In my case
> we load PyQt from the server (3 different locations depending on platform)
> so it's not even locally installed, but I have the project interpreter
> setup so PyCharm builds skeletons and I can happily use code completion.
>
>  Zachary
>
>
> 2015/06/01 23:52、Donald E Limbaugh <delimbaugh21 at students.tntech.edu>
> のメッセージ:
>
>   Has anyone used PyQt4 with the PyCharm IDE?
>
>
>
> I recently installed PyCharm on my Mac & like the IDE, but I can't seem to
> get it to recognize my install of PyQt4.  I was curious to hear if anyone
> else in the community is/has been using these two items together
> successfully...
>
>
>
> I'm running Mac OS X Mavericks v10.9.5​​, PyQt4 v4.11.3, and PyCharm v4.5.
>
>
>
> Thanks in advance for any help or suggestions!!
>
>
>
> --Don
>
>
>    _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150602/3ad15ee0/attachment.html>


More information about the PyQt mailing list