I have just updated my installation of Python 3.4 using Anaconda.
I am now unable to open a PyDev console in Aptana Studio using this version of Python, although I can use a different version of Python.
The error message I get is this:
Error initializing console.
Unexpected error connecting to console.
Failed to recive suitable Hello response from pydevconsole. Last msg received: Console already exited with value: 1 while waiting for an answer.
Error stream: C:\Users\z5044992\AppData\Local\Continuum\Anaconda3\lib\site-packages\IPython\utils\traitlets.py:5: UserWarning: IPython.utils.traitlets has moved to a top-level traitlets package.
warn("IPython.utils.traitlets has moved to a top-level traitlets package.")
Error starting server with host: 127.0.0.1, port: 52021, client_port: 52022
Traceback (most recent call last):
File "C:\Users\z5044992\AppData\Roaming\Appcelerator\Aptana Studio\plugins\org.python.pydev_3.0.0.1388187472\pysrc\pydevconsole.py", line 222, in <module>
StartServer(pydev_localhost.get_localhost(), int(port), int(client_port))
File "C:\Users\z5044992\AppData\Roaming\Appcelerator\Aptana Studio\plugins\org.python.pydev_3.0.0.1388187472\pysrc\pydevconsole.py", line 191, in StartServer
interpreter = InterpreterInterface(host, client_port, server)
File "C:\Users\z5044992\AppData\Roaming\Appcelerator\Aptana Studio\plugins\org.python.pydev_3.0.0.1388187472\pysrc\pydev_ipython_console.py", line 30, in __init__
self.interpreter = PyDevFrontEnd(pydev_host=host, pydev_client_port=client_port)
File "C:\Users\z5044992\AppData\Roaming\Appcelerator\Aptana Studio\plugins\org.python.pydev_3.0.0.1388187472\pysrc\pydev_ipython_console_011.py", line 299, in __init__
self.ipython = PyDevTerminalInteractiveShell.instance()
File "C:\Users\z5044992\AppData\Local\Continuum\Anaconda3\lib\site-packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\z5044992\AppData\Local\Continuum\Anaconda3\lib\site-packages\IPython\terminal\interactiveshell.py", line 396, in __init__
super(TerminalInteractiveShell, self).__init__(*args, **kwargs)
File "C:\Users\z5044992\AppData\Local\Continuum\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 495, in __init__
self.init_completer()
File "C:\Users\z5044992\AppData\Roaming\Appcelerator\Aptana Studio\plugins\org.python.pydev_3.0.0.1388187472\pysrc\pydev_ipython_console_011.py", line 220, in init_completer
self.Completer = self._new_completer_200()
File "C:\Users\z5044992\AppData\Roaming\Appcelerator\Aptana Studio\plugins\org.python.pydev_3.0.0.1388187472\pysrc\pydev_ipython_console_011.py", line 192, in _new_completer_200
use_readline=self.has_readline,
AttributeError: 'PyDevTerminalInteractiveShell' object has no attribute 'has_readline'
I have been following other threads and getting contradictory information about 32 and 64 bit compatibility. I am running 64-bit Win7. I now have both 64 bit and 32 bit versions of Java installed. Aptana only exists as 32 bit for Windows, and I think it uses the 32 bitJava, as Aptana would not initialise when I only had 64 bit Java installed. I have tried both 32-bit and 64-bit versions of Anaconda, with the same result.
I have tried updating ipython.
I have also tried changing the proxy settings to manual and selecting 127.0.0.1 and local host.
I have run out of ideas!
Uninstall Aptana.
Install PyCharm.
Simples.
Related
I was running python 2.7 in Anaconda2 in spyder 4 up until today with no problems. But now I keep getting the same error, when I make an environment and install python 2.7 and spyder in it:
Traceback (most recent call last):
File "/home/cmiprc/anaconda2/envs/test/lib/python2.7/site-packages/spyder/app/mainwindow.py", line 3718, in main
mainwindow = run_spyder(app, options, args)
File "/home/cmiprc/anaconda2/envs/test/lib/python2.7/site-packages/spyder/app/mainwindow.py", line 3557, in run_spyder
main = MainWindow(options)
File "/home/cmiprc/anaconda2/envs/test/lib/python2.7/site-packages/spyder/app/mainwindow.py", line 426, in init
from spyder.preferences.runconfig import RunConfigPage
File "/home/cmiprc/anaconda2/envs/test/lib/python2.7/site-packages/spyder/preferences /runconfig.py", line 482, in
class RunConfigPage(GeneralConfigPage):
File "/home/cmiprc/anaconda2/envs/test/lib/python2.7/site-packages/spyder/preferences/runconfig.py", line 487, in RunConfigPage
ICON = ima.icon('run')
File "/home/cmiprc/anaconda2/envs/test/lib/python2.7/site-packages/spyder/utils/icon_manager.py", line 394, in icon
directory=_resource['directory'])
File "/home/cmiprc/anaconda2/envs/test/lib/python2.7/site-packages/qtawesome/init.py", line 178, in load_font
return _instance().load_font(prefix, ttf_filename, charmap_filename, directory)
File "/home/cmiprc/anaconda2/envs/test/lib/python2.7/site-packages/qtawesome/init.py", line 54, in _instance
'materialdesignicons-webfont-charmap.json')
File "/home/cmiprc/anaconda2/envs/test/lib/python2.7/site-packages/qtawesome/iconic_font.py", line 206, in init
super().init()
TypeError: super() takes at least 1 argument (0 given)
This started happening after I reinstalled the package "pydicom" in the environment, and now nothing works. I have reinstalled anaconda2, used spyder --reset, and all other common suggestions.
Spyder 3.3.6 works in the base environment, but every time I make a new environment and install spyder in this, I get the same error. Any suggestions?
(Spyder maintainer here) To fix this problem, you need to install QtAwesome 0.7.3 in your environment. For that, please use the following command:
conda install qtawesome=0.7.3
I have installed Anaconda (Python 2.7) in Windows 7. Initially, it was a bit problematic to start spyder, but eventually I figured out that by running cmd as administrator, spyder starts. As soon as I ran my first python script in Spyder, it showed me an error in its internal console:
F:\PythonIDE\lib\site-packages\nbformat\current.py:19: UserWarning: nbformat.current is deprecated.
- use nbformat for read/write/validate public API
- use nbformat.vX directly to composing notebooks of a particular version
""")
F:\PythonIDE\lib\pkgutil.py:110: FutureWarning: The pandas.rpy module is deprecated and will be removed in a future version. We refer to external packages like rpy2.
See here for a guide on how to port your code to rpy2: http://pandas.pydata.org/pandas-docs/stable/r_interface.html
__import__(name)
F:\PythonIDE\lib\site-packages\matplotlib\cbook.py:137: MatplotlibDeprecationWarning: The matplotlib.delaunay module was deprecated in version 1.4. Use matplotlib.tri.Triangulation instead.
warnings.warn(message, mplDeprecation, stacklevel=1)
F:\PythonIDE\lib\site-packages\skimage\filter\__init__.py:6: skimage_deprecation: The `skimage.filter` module has been renamed to `skimage.filters`. This placeholder module will be removed in v0.13.
warn(skimage_deprecation('The `skimage.filter` module has been renamed '
Failed to write user configuration file.
Please submit a bug report.
Traceback (most recent call last):
File "F:\PythonIDE\lib\site-packages\spyderlib\plugins\editor.py", line 2066, in run_file
dialog.setup(fname)
File "F:\PythonIDE\lib\site-packages\spyderlib\plugins\runconfig.py", line 349, in setup
self.runconfigoptions = RunConfigOptions(self)
File "F:\PythonIDE\lib\site-packages\spyderlib\plugins\runconfig.py", line 148, in __init__
self.runconf = RunConfiguration()
File "F:\PythonIDE\lib\site-packages\spyderlib\plugins\runconfig.py", line 57, in __init__
self.set(CONF.get('run', 'defaultconfiguration', default={}))
File "F:\PythonIDE\lib\site-packages\spyderlib\userconfig.py", line 387, in get
self.set(section, option, default)
File "F:\PythonIDE\lib\site-packages\spyderlib\userconfig.py", line 446, in set
self._save()
File "F:\PythonIDE\lib\site-packages\spyderlib\userconfig.py", line 136, in _save
raise(e)
WindowsError: [Error 5] Access is denied: u'C:\\Users\\Shubhanshu\\.spyder2\\spyder.ini'
Now, how to rectify this error? I would be really grateful for any help in this regard.
Since my laptop crashed (for unknown reason) last night, Spyder has not been able to connect to a kernel. I am getting this error:
IOError: Could not find u'kernel-1809.json' in ['.', '~/Library/Jupyter/runtime']
(The name of the json file changes each time I attempt to launch an iPython console.)
This does not seem to be related to the matplotlib 1.5 issue, that I have seen elsewhere on here - it is using 1.4.3.
iPython (version 4.0.0) runs fine from the command line.
Mac 10.10.1 (Yosemite). Spyder 2.3.7. Python 2.7.10 64bits, Qt 4.8.7, PyQt4 (API v2) 4.11.3 on Darwin
UPDATED TO INCLUDE LOGS
>>> /Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/nbformat/current.py:19: UserWarning: nbformat.current is deprecated.
- use nbformat for read/write/validate public API
- use nbformat.vX directly to composing notebooks of a particular version
ERROR: 3rd party plugin import failed for `p_pylint`
Traceback (most recent call last):
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/otherplugins.py", line 53, in get_spyderplugins_mods
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderplugins/p_pylint.py", line 23, in <module>
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderplugins/widgets/pylintgui.py", line 71, in <module>
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderplugins/widgets/pylintgui.py", line 61, in get_pylint_version
File "subprocess.pyc", line 710, in __init__
File "subprocess.pyc", line 1335, in _execute_child
OSError: [Errno 2] No such file or directory
Traceback (most recent call last):
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/plugins/externalconsole.py", line 925, in <lambda>
give_focus=give_ipyclient_focus))
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/plugins/externalconsole.py", line 1033, in register_ipyclient
give_focus=give_focus)
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/plugins/ipythonconsole.py", line 836, in register_client
self.connect_client_to_kernel(client)
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/plugins/ipythonconsole.py", line 1048, in connect_client_to_kernel
client.password)
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/plugins/ipythonconsole.py", line 1017, in create_kernel_manager_and_client
cf = find_connection_file(connection_file)
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/jupyter_client/connect.py", line 185, in find_connection_file
raise IOError("Could not find %r in %r" % (filename, path))
IOError: Could not find u'kernel-2018.json' in ['.', u'/Users/garyspatterson/Library/Jupyter/runtime']
** Further update **
I deleted all files under the .spyder2/ folder in my user directory, reopened Spyder, and it was able to connect to an iPython console. So far, so good. Trouble is, when I added a path to the PYTHONPATH manager (so I could import external modules, such as nltk), I am back to getting the same error.
Had a similar issue and was able to resolve it by creating a new virtualenv with the same dependencies installed.
Now Spyder is working with the PYTHONPATH pointing at lib/python2.7/site-packages of the new environment.
I have a 32 bit WinXP system that used to run ipython notebook just fine under the Miniconda distribution (Python 3.4). But recently, when I start the ipython notebook interface in the browser I get a kernel error. The console shows a ZMQError. However, I have no issue working from the ipython console or even from inside PyCharm IDE, where python works fine. I am using a virtual environment, and the details about the error are given below:
Traceback (most recent call last):
File "F:\Miniconda3\envs\mltestbed\lib\site-packages\notebook\base\handlers.py", line 436, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "F:\Miniconda3\envs\mltestbed\lib\site-packages\notebook\services\sessions\handlers.py", line 56, in post
model = sm.create_session(path=path, kernel_name=kernel_name)
File "F:\Miniconda3\envs\mltestbed\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 66, in create_session
kernel_name=kernel_name)
File "F:\Miniconda3\envs\mltestbed\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 84, in start_kernel
**kwargs)
File "F:\Miniconda3\envs\mltestbed\lib\site-packages\jupyter_client\multikernelmanager.py", line 109, in start_kernel
km.start_kernel(**kwargs)
File "F:\Miniconda3\envs\mltestbed\lib\site-packages\jupyter_client\manager.py", line 241, in start_kernel
self._connect_control_socket()
File "F:\Miniconda3\envs\mltestbed\lib\site-packages\jupyter_client\manager.py", line 192, in _connect_control_socket
self._control_socket = self.connect_control()
File "F:\Miniconda3\envs\mltestbed\lib\site-packages\jupyter_client\connect.py", line 445, in connect_control
return self._create_connected_socket('control', identity=identity)
File "F:\Miniconda3\envs\mltestbed\lib\site-packages\jupyter_client\connect.py", line 417, in _create_connected_socket
sock = self.context.socket(socket_type)
File "F:\Miniconda3\envs\mltestbed\lib\site-packages\zmq\sugar\context.py", line 143, in socket
s = self._socket_class(self, socket_type)
File "zmq/backend/cython/socket.pyx", line 281, in zmq.backend.cython.socket.Socket.__cinit__ (zmq\backend\cython\socket.c:3220)
zmq.error.ZMQError: Connection refused
In need of help as my system contains a lot of code that would be difficult to port.
I am not sure if this helps you, but there seems to be a similar error experienced by some spyder users. This goes back to a problem in binding to a random port for the notebook server using ZeroMQ (see here). The bug in question seems to be fixed in ZeroMQ, but I am not sure if it has made it's way to the other packages you are using.
You could try to update the version of ipython-notebook you are using:
$ conda update ipython-notebook
and if this doesn't work you could fall back to an older version. Try creating a new environment with an older version to keep your (hopefully soon repaired) environment intact:
$ conda create -n fallback ipython-notebook=3 python=3.4
I hope this helps.
If I type the following at the python.exe command prompt...
>>>help('modules')
...I get a list of available modules as expected.
However when I type the same thing in the IDLE environment (idle.pyw), it throws an error:
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
help('modules')
File "C:\Python27\ArcGIS10.1\lib\site.py", line 467, in __call__
return pydoc.help(*args, **kwds)
File "C:\Python27\ArcGIS10.1\lib\pydoc.py", line 1727, in __call__
self.help(request)
File "C:\Python27\ArcGIS10.1\lib\pydoc.py", line 1766, in help
elif request == 'modules': self.listmodules()
File "C:\Python27\ArcGIS10.1\lib\pydoc.py", line 1887, in listmodules
ModuleScanner().run(callback, onerror=onerror)
File "C:\Python27\ArcGIS10.1\lib\pydoc.py", line 1938, in run
for importer, modname, ispkg in pkgutil.walk_packages(onerror=onerror):
File "C:\Python27\ArcGIS10.1\lib\pkgutil.py", line 105, in walk_packages
for importer, name, ispkg in iter_modules(path, prefix):
File "C:\Python27\ArcGIS10.1\lib\pkgutil.py", line 147, in iter_modules
for name, ispkg in iter_importer_modules(i, prefix):
File "C:\Python27\ArcGIS10.1\lib\pkgutil.py", line 211, in iter_modules
for fn in os.listdir(path):
WindowsError: [Error 5] Access is denied: 'C:\\WINDOWS\\system32\\Msdtc/*.*'
Why does Windows say "Access is denied" to IDLE but not the command line? I have tried using "Run as Administrator" on IDLE without success. Do I need to reconfigure IDLE in some way?
For information:
My installation of Python 2.7.2 (32-bit version running on a Windows 7 64-bit machine) came bundled with ArcGIS 10.1, which uses Python as a scripting language and certain numerical operations (via Numpy). Could this have something to do with the differing behaviour in the prompt and IDLE?
The root Python directory is: C:\Python27\ArcGIS10.1\.
IDLE is installed at C:\Python27\ArcGIS10.1\Lib\idlelib\idle.pyw.
The Python command prompt is installed at: C:\Python27\ArcGIS10.1\python.exe.
I just successfully ran help('modules') in both 2.7.8 and 3.4.2. The response depends on sys.path. It appears than ArcGIS adds C:/Windows/System32/Msdtc to the path, but you could check before running help. In any case, accessing that folder cannot be done through Windows Explorer, even when running as an admin. It requires special user action through a 'security tab'. Since MS does not want me poking around there, I did not pursue getting access. I don't know why the difference betweeon console and Idle.