-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with Spyder in Python 3.6 #6934
Comments
Did you use pip to install pyqt5 at some point? |
@ccordoba12 Almost positive that I have not done pip install of pyqt5 Should I try a pip install now? Thanks, Note I do have a completely separate (non-anaconda) Python 3 install on my machine which has QtPy 1.3.1 installed via pip, but pyqt is not listed. I hope this isn't adding to my issues. |
No, that's a sure way to break your Anaconda install. Make sure you are launching Spyder from the Anaconda prompt or Anaconda Navigator; launching from the normal command prompt or Git Bash will use your system Python version which will not work with Spyder since it won't have the right compiled packages installed (like PyQt, which is why you're likely seeing the PySide error as a fallback). In any case it looks like it can't find your Qt bindings; Spyder thinks you have Qt/PyQt 5.9.x installed which could also pose a problem since we don't officially support it yet I believe. In any case, unless user error is involved somewhere most likely something's amiss with your Anaconda install, in which case a clean reinstall is the most reliable solution. Other than that, please try the steps listed in the Spyder Troubleshooting Guide, specifically the Basic First Aid and Emergency CPR sections, which resolve the great majority of Spyder installation issues. |
Thanks for response! Also: My recent attempts have been with a fresh install of Anaconda. I tried all tips in troubleshoot guide that I can easily test now, including updating spyder and anaconda. I'm going to to wipe my Anaconda2 and install Anaconda3 instead, and see if my issues persist. Thanks, |
Okay, so you set up your
I don't regularly do so thus I can't comment specifically, but I have seen statements to the effect that running Python 3 and Spyder in an Anaconda2 environment can cause problems generally...
Oh, so it is a specific environment? Can you isolate the problem to any specific packages in that environment? Did you try creating a clean one with just Spyder? Other than that, anything specific to your setup in terms of packages, etc. installed? Also, could you try downgrading to Qt/PyQt 5.6 and seeing if the problems persist? |
Hi Cam, Yes I was having issues getting spyder in anaconda2 with any non-base python3 environments. I did an entire clean install of anaconda2 to replicate my issues and they still persisted. I only ran following commands and encountered issues above. Thus I don't think my issues are coming from specific packages that I decided to install.
Throughout this period I can get spyder working for my base python2.7 install. Just to stir the pot more:On the flipside, I wiped my anaconda2 install and switched to anaconda3. In my base Py3 envI can now get Spyder to launch from Win Start menu or Anaconda Nav, but not from Win Cmd, Git Bash, or Anaconda Prompt. In my other Py2 envNow I create a virtual env with Python 2. I get the whole flipped situation: I now have Qt problems in this new environment. I cannot open Spyder by any method. Is it feasible to maintain separate installs of ananconda2 and anaconda3? It's looking like my only option to having working py2 and py3 spyder instances working successfully. I checked my Qt versions. All versions are 5.6.x era and I'm still having issues. When I try to launch Spyder for my virtual env with Py2
Trying to force Spyder install when creating envOne other idea I tried: forcing installation of Spyder at outset of env creation
|
Found resolution to my issue, and going to close this now. I am really sorry if I've wasted a lot of people's time. Issue resolution in my case has to do with Win10 Administrator problems - even though I am sole admin on my laptop. In my newest fresh install of Anaconda3, I could launch Spyder via Win Start Menu with its default settings, without needing to run as admin. I now found I can launch Spyder for my secondary Py2 env by opening via Win Start Menu and running as Admin. I can also launch Spyder for my secondary Py2 env by running Win Cmd as admin, activating env, and then running Spyder. The Qt errors don't show up when I elevate. This seems to be a recurring issues in my Win10 installs but I somehow couldn't mouse this out in my prior Anaconda2 install where I had Py2 base and Py3 in a secondary env. Thanks for all the guidance! |
Interesting. I've installed Anaconda3 and launched Spyder by both shortcut and Anaconda Prompt in both Py2 and Py3 in Anaconda3 on both Win 8.1 and Win 10, both for all users and for my own admin and non-admin account, and never run into this problem without any elevation, Not sure exactly what would be different about your situation, but good to have another datapoint. Also, the Troubleshooting guide does mention installing by different means (admin and not), starting by different means (shortcut, Navigator, command line, etc) and elevating/running as administrator. |
@skykryst FYI, this is a closed issue from nearly a year ago, and Spyder currently only officially supports PyQt5 (the SO question you link is only about a problem with PySide), at least until the PySide/QtfP 5.12 ecosystem matures and Qt 5.12 LTS is available as a |
I managed to solve that as follow: |
Glad you got your problem resolved. However, do not that as I state in the comment directly above yours, this is unlikely to be an identical or even particularly similar problem to the one reported in the OP. The correct procedure to do all of this should be simply
The
This is no different than doing |
I have the same issue. As you suggested, I ran:
But I still get the error when running spyder:
|
@Mark531 Sorry you're seeing an error; I suspect something is going on with your environment. Open Anaconda prompt in the environment in which you tried to open Spyder, type
|
@CAM-Gerlach Thanks for your help. But in the meanwhile, I managed to fix the issue by running commands suggested by a guy on stackoverflow:
Now, spyder opens without problem. |
@Mark531 , I certainly hope you didn't run those commands (or any commands suggested by a random person on SO) in your
Almost certainly irrelevant to the problem;
This installs the old 5.6.x versions of Qt/PyQt; you should upgrade to the 5.9.x versions with |
I guess the guy precisely suggested to downgrade the version of pyqt because a later version was not fully supported. And this is the case indeed.
And I get back the error when I try to run spyder:
|
Yes indeed, occasionally some systems have problems with one Qt version or the other, bt that usually comes down to issues with their GPU, graphics driver or occasionally other installed software, and usually result in a segfault or other cryptic error rather than the one above (which indicates QtPy isn't able to find any Qt bindings at all). Any reasonably recent version of Spyder and QtPy fully supports both versions, so either the versions on your machine are out of date, something else in your Anaconda environment is causing issues, or perhaps there's some other sort of machine-specific issue. If you share your |
Sure, here is the list of the packages in my current environment:
|
@Mark531 Thanks. I enclosed it in details tags and a verbatim block for as I requested; since without that it takes up a huge amount of space in the thread and is very difficult to read. In any case, your issue is immediately apparent: you have installed a large number of packages in your environment via In any case, assuming that's your |
This error means that you installed pyqt5 with pip along side the pyqt conda package. It could be solved by you uninstalling the pip package. It will surely resolve your problem |
We appreciate you trying to help and share something that worked for you on a superficially similar error, but if you are going to post a potential solution, please do so on an open, non-duplicate issue and take care to read the actual issue report, as in both these cases the issue was not caused by the same problem and would not be fixed by your solution, and furthermore was already resolved and closed. Thanks.
This is but one of many potential causes of this error, the reporter explicitly stated that they have not used
Not explicitly necessary, but doesn't hurt.
The Anaconda Navigator GUI doesn't have anything to do with this; I'm not sure why you're suggesting it. The above is also missing a crucial step for many if not most such cases, which is ensuring the |
Sure, I have installed packaged from various sources because default conda channels did not contain the latest versions. So, I installed a fresh version of Anaconda, but since it was not available for python 3.6 (I use a library that only works in python 3.6), I created a virtual environment. After activating it and running spyder, the interpreter was yet python 3.7... I had to manually change the interpreter. Well, it would be simpler to make available an Anaconda installer for python 3.6. |
Well, your Sometime conda
You should never use virtualenvs in conda (although they do reputedly work). You should always use Conda environments instead, as they provide numerous benefits and avoid problems.
It is, it just doesn't come in the default installer. You have two easy options to resolve this: First, you can just run
How, from the command line with
We have no control over this, of course. You are welcome to ask them, but I doubt they'll do so, when users can create a new environment or downgrade the Python version in their |
Hey, CAM-Gerlach Thanks a lot! After doing these three lines didn´t solve my problem. But in addition with: solved my problem. I don´t know why it wasn´t properly installed before, but anyway, now it works.
|
You may either have not had |
Thanks a lot for the detailed reply! That makes a lot of sense. The last two reasons fit better. Good to know about those possibilities :)
|
Thanks, it solved my problem. I ran into this issue several time, when I was installing python on windows over anaconda. :) |
Hello everybody. I have problem with my spyder. My spyder does not work. The problem is: C: ... envs\kerasgpu\Scripts\spyder-script.py", line 6, in Can someone help me? |
Problem Description
Having issues running Spyder on Python Environments that are not my base environment.
In Spyder for Python 3.4, 3.5, 3.6, I can't get Spyder to launch, if I try in Win Cmd Prompt it cites some issue with PySide.
I setup environment with Python 3.3 and my Spyder install forced me to upgrade to 3.6. I can get Spyder to work and sometimes run a basic line, but I get cache error messages in terminal when I try to run a script.
I don't have problems in my base environment which runs Python 2.7
What steps will reproduce the problem?
4/3
What is the expected output? What do you see instead?
Here is result I see when I launch via Git Bash with Administrator Privileges. These errors appear before I can run a single python command in Spyder.
I can then run some basic commands in Spyder IDE like
4/3
but can't execute scripts.If I launch via Windows Start Menu I get the error but just see the kernel restarting.
However I am unable to install PySide since it appears to require Python 3.3. Should I force a downgrade to Python 3.3 to get this working? Is this safe?
Paste Traceback/Error Below (if applicable)
Package Versions
Dependencies
The text was updated successfully, but these errors were encountered: