Skip to content
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

Spyder crashes at startup in new conda environment python 3.4 on Windows 8.1 x64 #2858

Closed
silicium14 opened this issue Dec 7, 2015 · 16 comments

Comments

@silicium14
Copy link

(1). The bug

I create a new environment with conda create --name testspyder python=3.4 spyder
then I activate testspyder. When I don't specify spyder version, 2.3.8 is installed (spyder=2.3.8=py34_0).
When I try to start spyder in this environment, it crashes at startup, showing a Windows popup saying python.exe has stopped working. There is no console output with --show-console.

When I try to debug it with Microsoft Visual Studio 2015 (suggested to me by the debug button in the Windows popup), the following message appears:

Unhandled exception at 0x0000000063B347AF (QtGui4.dll) in python.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.

According to this message the problem seems to be related to Qt.

The same problem occurs with spyder 2.3.7 (spyder=2.3.7=py34_3):

conda create --name testspyder python=3.4 spyder=2.3.7

(2). Package version comparison
My spyder 2.3.7 is running OK in my "stable" environment. This stable environment is created with installing the anaconda meta package. From continuum.io:

The anaconda metapackage is designed for people who want to keep a stable set of packages, which have been tested together.

I decided to make 2 packages versions comparison:

  1. between my stable environment and conda create --name testspyder python=3.4 spyder (2.3.8)
  2. between my stable environment and conda create --name testspyder python=3.4 spyder=2.3.7

I only listed the packages common to the 2 compared environments AND with different versions.

  1. anaconda stable vs conda create --name testspyder python=3.4 spyder
name: stable                    name: testspyder (2.3.8)
dependencies:                   dependencies:
- libtiff=4.0.6=vc10_0          - libtiff=4.0.6=vc10_1
- msvc_runtime=1.0.0=vc10_0     - msvc_runtime=1.0.1=vc10_0
- path.py=8.1.2=py34_0          - path.py=8.1.2=py34_1
- psutil=3.2.2=py34_0           - psutil=3.3.0=py34_0
- pyqt=4.11.4=py34_2            - pyqt=4.11.4=py34_4
- python=3.4.3=3                - python=3.4.3=5
- pytz=2015.6=py34_0            - pytz=2015.7=py34_0
- qt=4.8.7=vc10_4               - qt=4.8.7=vc10_5
- qtconsole=4.1.0=py34_0        - qtconsole=4.1.1=py34_0
- setuptools=18.4=py34_0        - setuptools=18.5=py34_0
- sip=4.16.9=py34_1             - sip=4.16.9=py34_2
- spyder=2.3.7=py34_3           - spyder=2.3.8=py34_0
  1. anaconda stable vs conda create --name testspyder python=3.4 spyder=2.3.7
name: stable                    name: testspyder (2.3.7)
dependencies:                   dependencies:
- libtiff=4.0.6=vc10_0          - libtiff=4.0.6=vc10_1
- msvc_runtime=1.0.0=vc10_0     - msvc_runtime=1.0.1=vc10_0
- path.py=8.1.2=py34_0          - path.py=8.1.2=py34_1
- psutil=3.2.2=py34_0           - psutil=3.3.0=py34_0
- pyqt=4.11.4=py34_2            - pyqt=4.11.4=py34_4
- python=3.4.3=3                - python=3.4.3=5
- pytz=2015.6=py34_0            - pytz=2015.7=py34_0
- qt=4.8.7=vc10_4               - qt=4.8.7=vc10_5
- qtconsole=4.1.0=py34_0        - qtconsole=4.1.1=py34_0
- setuptools=18.4=py34_0        - setuptools=18.5=py34_0
- sip=4.16.9=py34_1             - sip=4.16.9=py34_2

I hope this helps. If this is not a spyder bug, then I hope this will help to identify the Qt / PyQt / ? bug.
This issue seems to be differs from #2834 since PyQwt is not installed in any of the 3 environments I present.

@Nodd
Copy link
Contributor

Nodd commented Dec 7, 2015

A colleague here has the same problem, but it was after an update, not a new environment. I tried to reset the preferences but it didn't change anything.

@ccordoba12
Copy link
Member

@silicium14, thanks for the detailed report. It seems that Qt was not compiled correctly for Python 3.4 by Continuum. I also found this error while testing other things last night.

However, this is not a Spyder bug because Spyder runs fine in Python 2.7 and 3.5 environments.

I'll report this problem with my coworkers at Continuum and see if we can solve it soon.

@timctran
Copy link

I was having a similar problem. Using the above information, I ran conda remove qt --name py34 and conda install qt=4.8.7=vc10_4 to fix the issue.

I am running Windows 7 with Anaconda where the root is python 3.5 and the installed environment is python 3.4. Spyder ran fine on the root and spyder environment python.exe has stopped working appeared when attempting to run Spyder for the environment.

@Heathckliff
Copy link

@timctran , Thanks ! Your solution works!

@fred777
Copy link

fred777 commented Jan 5, 2016

Thanks @timctran! I had the same problem on Windows 7 x64.

@liubenyuan
Copy link

@timctran
Thanks !!! It solved my problem. win 10 x64.

@liubenyuan
Copy link

I would be glad to helping solving this problem. Spyder failed to start occasionally when I update anaconda or matplotlib.

@Davo36
Copy link

Davo36 commented Jan 13, 2016

Yeah thanks heaps @timctran this fixed the spyder launch error for me too. Windows 10 64 bit.

@equalogix
Copy link

@timctran
This solved the problem, I had the same issue with Windows 7, x64, python 3.4.4-1 after upgrading from spyder 2.3.6 to spyder 2.3.8.

One note that maybe of interest before installing qt=4.8.7=vc10_4 the package was downgraded from qt=4.8.7=vc10_5. So it seems that 10_5 maybe at the root of the problem.

@Nodd
Copy link
Contributor

Nodd commented Jan 27, 2016

@ccordoba12 Has in been fixed in Anaconda ?

@friederikemeier
Copy link

@timctran Thanks a lot!!! Made my day!

@jitseniesen
Copy link
Member

I get something very similar on Windows 7 x64 with Spyder 3.0.1, Python 3.4.5 and qt 4.8.7-vc10_9 from anaconda. I think this is what is behind the hanging automatic test of spyder-unittest with this configuration, as shown in the corresponding log.

@batuhandayioglugil
Copy link

batuhandayioglugil commented Dec 13, 2016

@timctran thank you. Additionally i did conda install spyder because I was getting the below error about PySide module.

`Traceback (most recent call last):
File "C:\Users\ali.dayioglugil\AppData\Local\Continuum\Anaconda3\lib\site-packages\qtpy_init_.py", line 119, in
from PySide import version as PYSIDE_VERSION # analysis:ignore
ImportError: No module named 'PySide'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\ali.dayioglugil\AppData\Local\Continuum\Anaconda3\Scripts\spyder-script.py", line 5, in
sys.exit(spyder.app.start.main())
File "C:\Users\ali.dayioglugil\AppData\Local\Continuum\Anaconda3\lib\site-packages\spyder\app\start.py", line 103, in main
from spyder.app import mainwindow
File "C:\Users\ali.dayioglugil\AppData\Local\Continuum\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 49, in
requirements.check_qt()
File "C:\Users\ali.dayioglugil\AppData\Local\Continuum\Anaconda3\lib\site-packages\spyder\requirements.py", line 39, in check_qt
import qtpy
File "C:\Users\ali.dayioglugil\AppData\Local\Continuum\Anaconda3\lib\site-packages\qtpy_init_.py", line 125, in
raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found`

@ccordoba12
Copy link
Member

Closing because this is not really a Spyder bug.

Also, please Qt5 instead of Qt4.

@khushirao
Copy link

C:\Users\Khushboo>spyder --show-console
Unable to create process using 'C:\Users\Khushboo\Anaconda3\python.exe C:\Users\Khushboo\Anaconda3\Scripts\spyder-script.py --show-console'

facing error while running spyder through command prompt

@QQ-Marshmello
Copy link

@timctran Thank you! This solves the problem.
Spyder crashes on my win10 64bit python 3.8 environment "TF". ">conda remove qt --name TF" and ">conda install qt=5.9.7=vc14h73c81de_0" fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests