Strange fix to startup problems

612 views
Skip to first unread message

Roel De Coninck

unread,
Mar 16, 2012, 9:05:22 AM3/16/12
to spyd...@googlegroups.com
Dear all,

I had 2 big problems with spyder (windows7, 64 bit)
1) the program does not always start (I see a window popping up for a second, then it closes and nothing happens)
2) import sitecustomize failed

The first problem seemed to occur more often after spyder was closed down: restarting rarely worked.
Now I found a solution to that problem, that is very surprising to me: I right click on the shortcut to start spyder, and copy the target (looks like this:
C:\Python27\python.exe "C:\Python27\Scripts\spyder").  Then I go to a windows command window, paste and enter ==> spyder starts without any problem. Why would this work, but not by clicking on the shortcut?

I just thought I'd let you know.  I'm extremely delighted that this works, I hope the trick will keep on working in the future, or even better: that spyder would launch from the shortcut directly.
Regards,
Roel



Roel De Coninck

unread,
Mar 17, 2012, 4:23:33 PM3/17/12
to spyd...@googlegroups.com
hm, I have bad news: even with the 'trick', it doesn't work now.  
So I started Spyder (v2.1.8), it started but import sitecustomize failed.  I closed spyder to try again, but then it didn't start anymore, neither way.
But the good news: using the windows console, it kept the messages, and so I can give you the error message in the screenshot added.
As you can see, there's a problem saving the .spyder.ini file.  

I can open the .spyder.ini file, and save it, so the 'w' options should be fine.  When I remove the file and start spyder again, I get exactly the same error message, but a new .spyder.ini is created in the right location.

I see not solution.  Am I the only one suffering from this issue?

thanks for your help,
Roel
SpyderError.jpg

Pierre Raybaut

unread,
Mar 18, 2012, 8:31:08 AM3/18/12
to spyd...@googlegroups.com
Hi,

I see that you are a Windows 7 user: have you disabled UAC? (that is
almost mandatory when doing development on Windows 7)

-Pierre

> --
> You received this message because you are subscribed to the Google Groups
> "spyder" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/spyderlib/-/SlhEyOHVc-YJ.
>
> To post to this group, send email to spyd...@googlegroups.com.
> To unsubscribe from this group, send email to
> spyderlib+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/spyderlib?hl=en.

Roel De Coninck

unread,
Mar 20, 2012, 4:33:56 AM3/20/12
to spyd...@googlegroups.com
Yes, UAC was disabled.

I found the solution, although it's probably only a workaround the problem:
I changed the userconfig.py file, and disabled saving to the .spyder.ini file like this:

def __save(self):
        """
        Save config into the associated .ini file
        """
        #this part of the script causes problems so let's try to save nothing at all
        #conf_file = file(self.filename(),'w')
        #self.write(conf_file)
        #conf_file.close()
        pass

Now, I can shut down spyder and open again without problems.  And it even looks like the import sitecustomize fails error is gone. 
Roel


> For more options, visit this group at
> http://groups.google.com/group/spyderlib?hl=en.

> spyderlib+unsubscribe@googlegroups.com.


> For more options, visit this group at
> http://groups.google.com/group/spyderlib?hl=en.

> spyderlib+unsubscribe@googlegroups.com.


> For more options, visit this group at
> http://groups.google.com/group/spyderlib?hl=en.

> spyderlib+unsubscribe@googlegroups.com.

Pierre Raybaut

unread,
Mar 25, 2012, 1:16:30 PM3/25/12
to spyd...@googlegroups.com
Well I really can't think of a reason why accessing this file is not possible...

Anyone has any idea of what's going on?

-Pierre

>> > spyderlib+...@googlegroups.com.

>> > spyderlib+...@googlegroups.com.

>> > spyderlib+...@googlegroups.com.

>> > spyderlib+...@googlegroups.com.


>> > For more options, visit this group at
>> > http://groups.google.com/group/spyderlib?hl=en.
>

> --
> You received this message because you are subscribed to the Google Groups
> "spyder" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/spyderlib/-/61nOlIauMuMJ.


> To post to this group, send email to spyd...@googlegroups.com.
> To unsubscribe from this group, send email to

> spyderlib+...@googlegroups.com.

david camacho

unread,
Feb 6, 2014, 4:35:12 PM2/6/14
to spyd...@googlegroups.com
My solution for your two problems:

a) Change the properties of the spyder shortcut.
instead of
C:\Python27\Scripts\spyder.exe
use:
C:\Python27\Scripts\spyder.bat

b)Modify the script:
"sitecustomize.py"

changing at the top:
import sys
for:
from sys import sys






parth shrotri

unread,
Jun 20, 2014, 11:34:46 AM6/20/14
to spyd...@googlegroups.com
Hi , I am very new to python dev.
I recently installed anaconda for windows 7 with 64 bit with python 2.7.7
Upon launching spyder I got following error in  '''import sitecustomize' failed; use -v for traceback''

Also I am not able to run any python script and getting error as NameError: name 'runfile' is not defined.

Can you plaese help.

Please find attached kernel console messages.

Thanks
kernel_spyder_error.txt

Carlos Córdoba

unread,
Jun 20, 2014, 12:42:37 PM6/20/14
to spyd...@googlegroups.com
Hi,

This error is usually generated because your Antivirus is too strict and doesn't let us open a port in your machine to send and receive data between Spyder and the local process in charge of running code.

You have two options here:

1. If you are using Norton, you need to uninstall it and install a different Antivirus (I couldn't find a way to change its behavior!). I'd recommend you ZoneAlarm.

2. Find a way to define a new rule for your antivirus to let Spyder to open internal ports. This depends on the antivirus, so I'm sorry for being unable to give you more detailed advice about it.


Cheers,
Carlos

El 20/06/14 10:34, parth shrotri escribió:
--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.

To post to this group, send email to spyd...@googlegroups.com.

parth shrotri

unread,
Jun 20, 2014, 6:24:55 PM6/20/14
to spyd...@googlegroups.com
Thanks Carlos for giving the solution.

I am yet to try it.
I have avast antivirus installed.
Can you help me like how should I configure it to allow access to internal ports.

parth shrotri

unread,
Jun 20, 2014, 9:00:54 PM6/20/14
to spyd...@googlegroups.com
Hi Just to try to resolve the antivirus problem , I disabled all the shield protection , including antivirus firewall , web protection and all.

 I restarted the spyder but , unfortunately I am still getting the same error.

  'import sitecustomize' failed; use ‑v for traceback
‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
ZMQError Traceback (most recent call last)
C:\Users\PARTH\Anaconda\lib\site‑packages\spyderlib\widgets\externalshell\start_ipython_kernel.py in()
185 ipk_temp = IPKernelApp.instance()

Kindly help

I really want to use spyder asap.
Thanks



On Friday, June 20, 2014 10:42:37 AM UTC-6, Carlos Córdoba wrote:

Adrian Klaver

unread,
Jun 22, 2014, 10:04:37 AM6/22/14
to spyd...@googlegroups.com
On 06/20/2014 06:00 PM, parth shrotri wrote:
> Hi Just to try to resolve the antivirus problem , I disabled all the
> shield protection , including antivirus firewall , web protection and all.
>
> I restarted the spyder but , unfortunately I am still getting the same
> error.
>
> 'import sitecustomize' failed; use ‑v for traceback
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
> ZMQError Traceback (most recent call last)
> C:\Users\PARTH\Anaconda\lib\site‑packages\spyderlib\widgets\externalshell\start_ipython_kernel.py
> in()
> 185 ipk_temp = IPKernelApp.instance()
>
> Kindly help

What version of Spyder are you using?

>
> I really want to use spyder asap.
> Thanks


--
Adrian Klaver
adrian...@aklaver.com

Adrian Klaver

unread,
Jun 22, 2014, 10:04:37 AM6/22/14
to spyd...@googlegroups.com
On 06/20/2014 06:00 PM, parth shrotri wrote:
> Hi Just to try to resolve the antivirus problem , I disabled all the
> shield protection , including antivirus firewall , web protection and all.
>
> I restarted the spyder but , unfortunately I am still getting the same
> error.
>
> 'import sitecustomize' failed; use ‑v for traceback
> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
> ZMQError Traceback (most recent call last)
> C:\Users\PARTH\Anaconda\lib\site‑packages\spyderlib\widgets\externalshell\start_ipython_kernel.py
> in()
> 185 ipk_temp = IPKernelApp.instance()
>
> Kindly help

Just realized there was an attachment in your original email. The issue
seems to be this:

ZMQError: Permission denied
runfile('C:/Users/PARTH/.spyder2/temp.py', wdir=r'C:/Users/PARTH/.spyder2')

So what user are you running Spyder as?

More importantly does that user have rights on C:/Users/PARTH/.spyder2/?


>
> I really want to use spyder asap.
> Thanks



--
Adrian Klaver
adrian...@aklaver.com

parth shrotri

unread,
Jun 23, 2014, 11:39:39 AM6/23/14
to spyd...@googlegroups.com
Hi Adrian,

I am the only user using this machine and am the admin user.
I don't know why that permission error is coming.

Parth

Adrian Klaver

unread,
Jun 23, 2014, 4:54:00 PM6/23/14
to spyd...@googlegroups.com, parth1...@gmail.com
On 06/23/2014 08:39 AM, parth shrotri wrote:
> Hi Adrian,
>
> I am the only user using this machine and am the admin user.

So, is Spyder running as you or as a user you don't know about?

> I don't know why that permission error is coming.

Well, finding the answer will solve the problem:) I would start by
assuming nothing and actually looking at the permissions on the .spyder
directory.

>
> Parth
>


--
Adrian Klaver
adrian...@aklaver.com
Reply all
Reply to author
Forward
0 new messages