Bug report #9573
hostnames with non-ascii characters cause python console to fail.
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | PyQGIS Console | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | windows | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 18156 |
Description
Can't open Python consoler right after a clean install. This could be caused by my username in Windows which contains Czech characters but I tried it under the guest account and had the same error.
Failed to open Python console: Traceback (most recent call last): File "", line 2, in File "C:/PROGRA~1/QGISDU~1/apps/qgis/./python\\console\\console.py", line 43, in show_console _console = PythonConsole( parent ) File "C:/PROGRA~1/QGISDU~1/apps/qgis/./python\\console\\console.py", line 75, in __init__ self.console = PythonConsoleWidget(self) File "C:/PROGRA~1/QGISDU~1/apps/qgis/./python\\console\\console.py", line 103, in __init__ self.shellOut = ShellOutputScintilla(self) File "C:/PROGRA~1/QGISDU~1/apps/qgis/./python\\console\\console_output.py", line 97, in __init__ self.insertInitText() File "C:/PROGRA~1/QGISDU~1/apps/qgis/./python\\console\\console_output.py", line 139, in insertInitText socket.gethostname()) UnicodeDecodeError: 'ascii' codec can't decode byte 0x9d in position 3: ordinal not in range(128) Python version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] QGIS version: 2.0.1-Dufour 'Dufour', d94c044 Python path: ['C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins\\\\processing', 'C:/PROGRA~1/QGISDU~1/apps/qgis/./python', 'C:\\\\Users\\\\Smr\\x9dokv\\xedtek/.qgis2/python', 'C:\\\\Users\\\\Smr\\x9dokv\\xedtek/.qgis2/python/plugins', 'C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins', 'C:\\\\PROGRA~1\\\\QGISDU~1\\\\bin\\\\python27.zip', 'C:\\\\PROGRA~1\\\\QGISDU~1\\\\apps\\\\Python27\\\\DLLs', 'C:\\\\PROGRA~1\\\\QGISDU~1\\\\apps\\\\Python27\\\\lib', 'C:\\\\PROGRA~1\\\\QGISDU~1\\\\apps\\\\Python27\\\\lib\\\\plat-win', 'C:\\\\PROGRA~1\\\\QGISDU~1\\\\apps\\\\Python27\\\\lib\\\\lib-tk', 'C:\\\\PROGRA~1\\\\QGISDU~1\\\\bin', 'C:\\\\PROGRA~1\\\\QGISDU~1\\\\apps\\\\Python27', 'C:\\\\PROGRA~1\\\\QGISDU~1\\\\apps\\\\Python27\\\\lib\\\\site-packages', 'C:\\\\PROGRA~1\\\\QGISDU~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\PIL', 'C:\\\\PROGRA~1\\\\QGISDU~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\win32', 'C:\\\\PROGRA~1\\\\QGISDU~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\win32\\\\lib', 'C:\\\\PROGRA~1\\\\QGISDU~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\Pythonwin', 'C:\\\\PROGRA~1\\\\QGISDU~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\Shapely-1.2.18-py2.7-win-amd64.egg', 'C:\\\\PROGRA~1\\\\QGISDU~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\six-1.3.0-py2.7.egg', 'C:\\\\PROGRA~1\\\\QGISDU~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\wx-2.8-msw-unicode', 'C:\\\\PROGRA~1\\\\QGISDU~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\xlrd-0.9.2-py2.7.egg', 'C:\\\\PROGRA~1\\\\QGISDU~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\xlwt-0.7.5-py2.7.egg', 'C:\\\\PROGRA~1\\\\QGISDU~1\\\\apps\\\\qgis\\\\python\\\\plugins\\\\fTools\\\\tools']
History
#1 Updated by Giovanni Manghi almost 11 years ago
- Status changed from Open to Feedback
- Target version changed from Version 2.0.0 to Version 2.2
Chars like "ã" or "ç" in the username are not an issue here on Windows 7 on both qgis 2 and master.
#2 Updated by Matthias Kuhn almost 11 years ago
What is your system's hostname?
#3 Updated by Matthias Kuhn almost 11 years ago
Likely related: http://bugs.python.org/issue9377
#4 Updated by Raphael Luthi over 10 years ago
- Target version changed from Version 2.2 to Version 2.0.0
I've got the same problem:
Operating Syste: Windows 7 (64 bit)
QGIS: 2.0.1 - Dufour
Installation: osgeo4w (64bit)
Error Message:
Failed to open Python console: Traceback (most recent call last): File "", line 2, in File "C:/OSGEO4~1/apps/qgis/./python\\console\\console.py", line 43, in show_console _console = PythonConsole( parent ) File "C:/OSGEO4~1/apps/qgis/./python\\console\\console.py", line 75, in __init__ self.console = PythonConsoleWidget(self) File "C:/OSGEO4~1/apps/qgis/./python\\console\\console.py", line 103, in __init__ self.shellOut = ShellOutputScintilla(self) File "C:/OSGEO4~1/apps/qgis/./python\\console\\console_output.py", line 97, in __init__ self.insertInitText() File "C:/OSGEO4~1/apps/qgis/./python\\console\\console_output.py", line 139, in insertInitText socket.gethostname()) UnicodeDecodeError: 'ascii' codec can't decode byte 0xeb in position 5: ordinal not in range(128) Python version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] QGIS version: 2.0.1-Dufour 'Dufour', d94c044 Python path: ['C:/OSGEO4~1/apps/qgis/./python/plugins\\\\processing', 'C:/OSGEO4~1/apps/qgis/./python', 'C:\\\\Users\\\ aphael_luthi/.qgis2/python', 'C:\\\\Users\\\ aphael_luthi/.qgis2/python/plugins', 'C:/OSGEO4~1/apps/qgis/./python/plugins', 'C:\\\\OSGEO4~1\\\\bin\\\\python27.zip', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\DLLs', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\plat-win', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\lib-tk', 'C:\\\\OSGEO4~1\\\\bin', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\site-packages', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\PIL', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\win32', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\win32\\\\lib', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\Pythonwin', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\Shapely-1.2.18-py2.7-win-amd64.egg', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\six-1.3.0-py2.7.egg', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\wx-2.8-msw-unicode', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\xlrd-0.9.2-py2.7.egg', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\xlwt-0.7.5-py2.7.egg', 'C:\\\\OSGEO4~1\\\\apps\\\\qgis\\\\python\\\\plugins\\\\fTools\\\\tools']
#5 Updated by Jürgen Fischer over 10 years ago
- OS version changed from 7 proffesional 64b to 7 professional 64b
Raphael Luthi wrote:
I've got the same problem:
And your hostname is?
#6 Updated by Salvatore Larosa over 10 years ago
- Affected QGIS version changed from 2.0.1 to master
- Target version changed from Version 2.0.0 to Version 2.4
#7 Updated by Raphael Luthi over 10 years ago
My host name is "Raphaël-PC".
#8 Updated by Raphael Luthi over 10 years ago
I changed my host name and now it works fine. Thank you!
#9 Updated by Salvatore Larosa over 10 years ago
Hi Raphael,
can you try to change the file console_output.py to the line 139
by replacing with the following: unicode(socket.gethostname())
in order to understand if it is a trivial fix?
You have to use the hostname with non-ascii chars though.
#10 Updated by Raphael Luthi over 10 years ago
The line 139 is "self.selectAllShortcut.activated.connect(self.selectAll)"
Should I replace the whole line by unicode "socket.gethostname())"?
#11 Updated by Salvatore Larosa over 10 years ago
Sorry, I meant to the line 145: https://github.com/qgis/QGIS/blob/master/python/console/console_output.py#L145
#12 Updated by Jürgen Fischer over 10 years ago
- Target version changed from Version 2.4 to Future Release - High Priority
#13 Updated by Tim Paysen over 10 years ago
I've had the same problem with the last few releaes of QGIS. It used to mention probles opening 'SIP', but no longer does that...it just can't open python. Here is my current version:
QGIS version 2.2.0-Valmiera QGIS code revision c3a2817 Compiled against Qt 4.8.5 Running against Qt 4.8.5 Compiled against GDAL/OGR 1.10.1 Running against GDAL/OGR 1.10.1 Compiled against GEOS 3.4.2-CAPI-1.8.2 Running against GEOS 3.4.2-CAPI-1.8.2 r3921 PostgreSQL Client Version 9.2.4 SpatiaLite Version 4.1.1 QWT Version 5.2.3 PROJ.4 Version 480 QScintilla2 Version 2.7.2
and the error message:
Couldn't load SIP module. Python support will be disabled. Traceback (most recent call last): File "", line 1, in ImportError: DLL load failed: %1 is not a valid Win32 application. Python version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] QGIS version: 2.2.0-Valmiera 'Valmiera', c3a2817 Python path: ['C:/PROGRA~1/QGISVA~1/apps/qgis/./python', u'C:/Users/Tim/.qgis2/python', u'C:/Users/Tim/.qgis2/python/plugins', 'C:/PROGRA~1/QGISVA~1/apps/qgis/./python/plugins', 'C:\\\\Python27', 'C:\\\\Python27\\\\Lib\\\\site-packages\\\ umpy', 'C:\\\\Python27\\\\tcl', 'C:\\\\Python27\\\\python.exe', 'C:\\\\Python27\\\\Lib', 'C:\\\\Python27\\\\Lib\\\\idlelib', 'C:\\\\Python27\\\\Lib\\\\site-packages', 'C:\\\\Python27\\\\Lib\\\\site-packages\\\\PyQt4\\\\bin\\\\QtCore4.dll', 'C:\\\\Python27\\\\Lib\\\\site-packages\\\\Orange\\\\OrangeCanvas', 'C:\\\\Program Files\\\\QGIS Valmiera\\\\apps\\\\qgis\\\\python', 'C:\\\\Python27\\\\Lib\\\\site-packages\\\\PyQt4\\\\sip', 'C:\\\\Python27\\\\Lib\\\\site-packages\\\\PyQt4\\\\bin', 'C:\\\\Program Files\\\\QGIS Valmiera\\\\apps\\\\Python27\\\\sip', 'C:\\\\PROGRA~1\\\\QGISVA~1\\\\bin', 'C:\\\\PROGRA~1\\\\QGISVA~1\\\\bin\\\\python27.zip', 'C:\\\\PROGRA~1\\\\QGISVA~1\\\\apps\\\\Python27\\\\DLLs', 'C:\\\\PROGRA~1\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib', 'C:\\\\PROGRA~1\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib\\\\plat-win', 'C:\\\\PROGRA~1\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib\\\\lib-tk', 'C:\\\\PROGRA~1\\\\QGISVA~1\\\\apps\\\\Python27', 'C:\\\\PROGRA~1\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib\\\\site-packages', 'C:\\\\PROGRA~1\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\PIL', 'C:\\\\PROGRA~1\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\win32', 'C:\\\\PROGRA~1\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\win32\\\\lib', 'C:\\\\PROGRA~1\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\Pythonwin', 'C:\\\\PROGRA~1\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\Shapely-1.2.18-py2.7-win-amd64.egg', 'C:\\\\PROGRA~1\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\six-1.3.0-py2.7.egg', 'C:\\\\PROGRA~1\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\wx-2.8-msw-unicode', 'C:\\\\PROGRA~1\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\xlrd-0.9.2-py2.7.egg', 'C:\\\\PROGRA~1\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\xlwt-0.7.5-py2.7.egg']
#14 Updated by Nathan Woodrow over 10 years ago
Are you running QGIS 64 and do you have a 32 bit version of Python in `C:\\Python27`.
Looks like it's picking up a wrong library.
#15 Updated by Tim Paysen over 10 years ago
No--(I WAS running QGIS 64--but now running 32).
The results all varied very slightly, depending on what things I did to try to fix the problem. Here is a copy of the messages from today (5/11/2014):
Couldn't load PyQt4. Python support will be disabled. Traceback (most recent call last): File "", line 1, in ImportError: DLL load failed: The specified procedure could not be found. Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)] QGIS version: 2.2.0-Valmiera 'Valmiera', c3a2817 Python path: ['C:/PROGRA~2/QGISVA~1/apps/qgis/./python', u'C:/Users/Tim/.qgis2/python', u'C:/Users/Tim/.qgis2/python/plugins', 'C:/PROGRA~2/QGISVA~1/apps/qgis/./python/plugins', 'C:\\\\Users\\\\Tim\\\\AppData\\\\Roaming\\\\Python\\\\Python27\\\\site-packages\\\\orange_bioinformatics-2.5.25-py2.7.egg', 'C:\\\\Users\\\\Tim\\\\AppData\\\\Roaming\\\\Python\\\\Python27\\\\site-packages\\\\orange_nmf-0.1.2-py2.7.egg', 'C:\\\\Users\\\\Tim\\\\AppData\\\\Roaming\\\\Python\\\\Python27\\\\site-packages\\\ imfa-1.0-py2.7.egg', 'C:\\\\Users\\\\Tim\\\\AppData\\\\Roaming\\\\Python\\\\Python27\\\\site-packages\\\\orange_network-0.3.2-py2.7.egg', 'C:\\\\Users\\\\Tim\\\\AppData\\\\Roaming\\\\Python\\\\Python27\\\\site-packages\\\\orange_reliability-0.2.14-py2.7.egg', 'C:\\\\Users\\\\Tim\\\\AppData\\\\Roaming\\\\Python\\\\Python27\\\\site-packages\\\\orangecontrib.earth-0.1.3-py2.7-win32.egg', 'C:\\\\Users\\\\Tim\\\\AppData\\\\Roaming\\\\Python\\\\Python27\\\\site-packages\\\\orange_multitarget-0.9.3-py2.7.egg', 'C:\\\\Users\\\\Tim\\\\AppData\\\\Roaming\\\\Python\\\\Python27\\\\site-packages\\\\orange_textable-1.4.2-py2.7.egg', 'C:\\\\Users\\\\Tim\\\\AppData\\\\Roaming\\\\Python\\\\Python27\\\\site-packages\\\\orange_modelmaps-0.2.8-py2.7.egg', 'C:\\\\Python27', 'C:\\\\Python27\\\\Lib', 'C:\\\\Python27\\\\DLLs', 'C:\\\\Python27\\\\Doc', 'C:\\\\Python27\\\\include', 'C:\\\\Python27\\\\libs', 'C:\\\\Python27\\\\Lib\\\\site-packages\\\\PyQt4', 'C:\\\\Python27\\\\Scripts', 'C:\\\\Python27\\\\share', 'C:\\\\Python27\\\\tcl\\\\tcl8.5', 'C:\\\\Python27\\\\Tools', 'C:\\\\Python27\\\\Lib\\\\site-packages', 'C:\\\\PROGRA~2\\\\QGISVA~1\\\\bin', 'C:\\\\PROGRA~2\\\\QGISVA~1\\\\bin\\\\python27.zip', 'C:\\\\Python27\\\\lib\\\\site-packages\\\\Orange\\\\orng', 'C:\\\\PROGRA~2\\\\QGISVA~1\\\\apps\\\\Python27\\\\DLLs', 'C:\\\\PROGRA~2\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib', 'C:\\\\PROGRA~2\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib\\\\plat-win', 'C:\\\\PROGRA~2\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib\\\\lib-tk', 'C:\\\\Users\\\\Tim\\\\AppData\\\\Roaming\\\\Python\\\\Python27\\\\site-packages', 'C:\\\\PROGRA~2\\\\QGISVA~1\\\\apps\\\\Python27', 'C:\\\\PROGRA~2\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib\\\\site-packages', 'C:\\\\PROGRA~2\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\PIL', 'C:\\\\PROGRA~2\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\win32', 'C:\\\\PROGRA~2\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\win32\\\\lib', 'C:\\\\PROGRA~2\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\Pythonwin', 'C:\\\\PROGRA~2\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\Shapely-1.2.18-py2.7-win32.egg', 'C:\\\\PROGRA~2\\\\QGISVA~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\wx-2.8-msw-unicode']
This problem has been going for a few years (!!). Suggestions from 3-4 years ago are a bundle of guesses. I hope the QGIS folks can figure it out. (Python itself is plagued with problems--within its own distribution. The only way to open 'IDLE' is to sign on as 'administrator'--and things that depend on Python don't always put up-to-date .bat calls into their installations (eg-Orange)
I'm using Windows 7 x64.
#16 Updated by Nathan Woodrow over 10 years ago
See this
'C:\\\\Python27', 'C:\\\\Python27\\\\Lib', 'C:\\\\Python27\\\\DLLs', 'C:\\\\Python27\\\\Doc', 'C:\\\\Python27\\\\include', 'C:\\\\Python27\\\\libs', 'C:\\\\Python27\\\\Lib\\\\site-packages\\\\PyQt4'
Tells me that it's picking up more then it should, and you are getting lib conflicts.
How are you starting QGIS?
My path in Python look like this when inside QGIS:
['', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\pip-1.4.1-py2.7.egg', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\setuptools-2.1-py2.7.egg', 'C:\\\\OSGeo4W\\\\bin\\\\python27.zip', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\DLLs', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\plat-win', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\lib-tk', 'C:\\\\OSGeo4W\\\\bin', 'C:\\\\OSGeo4W\\\\apps\\\\Python27', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\GDAL-1.11.0-py2.7-win32.egg', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\PIL', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\win32', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\win32\\\\lib', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\Pythonwin', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\Shapely-1.2.18-py2.7-win32.egg', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\wx-2.8-msw-unicode']
#17 Updated by Tim Paysen over 10 years ago
I'm opening it directly from the QGIS icon. I notice that you are opening through the OSGEO bundle---I just did the same thing, and got the same set of messages with the 'OSGEO' feature added:
Couldn't load PyQt4. Python support will be disabled. Traceback (most recent call last): File "", line 1, in ImportError: DLL load failed: The specified procedure could not be found. Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)] QGIS version: 2.2.0-Valmiera 'Valmiera', c3a2817 Python path: ['C:/OSGeo4W/apps/qgis/./python', u'C:/Users/Tim/.qgis2/python', u'C:/Users/Tim/.qgis2/python/plugins', 'C:/OSGeo4W/apps/qgis/./python/plugins', 'C:\\\\Users\\\\Tim\\\\AppData\\\\Roaming\\\\Python\\\\Python27\\\\site-packages\\\\orange_bioinformatics-2.5.25-py2.7.egg', 'C:\\\\Users\\\\Tim\\\\AppData\\\\Roaming\\\\Python\\\\Python27\\\\site-packages\\\\orange_nmf-0.1.2-py2.7.egg', 'C:\\\\Users\\\\Tim\\\\AppData\\\\Roaming\\\\Python\\\\Python27\\\\site-packages\\\ imfa-1.0-py2.7.egg', 'C:\\\\Users\\\\Tim\\\\AppData\\\\Roaming\\\\Python\\\\Python27\\\\site-packages\\\\orange_network-0.3.2-py2.7.egg', 'C:\\\\Users\\\\Tim\\\\AppData\\\\Roaming\\\\Python\\\\Python27\\\\site-packages\\\\orange_reliability-0.2.14-py2.7.egg', 'C:\\\\Users\\\\Tim\\\\AppData\\\\Roaming\\\\Python\\\\Python27\\\\site-packages\\\\orangecontrib.earth-0.1.3-py2.7-win32.egg', 'C:\\\\Users\\\\Tim\\\\AppData\\\\Roaming\\\\Python\\\\Python27\\\\site-packages\\\\orange_multitarget-0.9.3-py2.7.egg', 'C:\\\\Users\\\\Tim\\\\AppData\\\\Roaming\\\\Python\\\\Python27\\\\site-packages\\\\orange_textable-1.4.2-py2.7.egg', 'C:\\\\Users\\\\Tim\\\\AppData\\\\Roaming\\\\Python\\\\Python27\\\\site-packages\\\\orange_modelmaps-0.2.8-py2.7.egg', 'C:\\\\Python27', 'C:\\\\Python27\\\\Lib', 'C:\\\\Python27\\\\DLLs', 'C:\\\\Python27\\\\Doc', 'C:\\\\Python27\\\\include', 'C:\\\\Python27\\\\libs', 'C:\\\\Python27\\\\Lib\\\\site-packages\\\\PyQt4', 'C:\\\\Python27\\\\Scripts', 'C:\\\\Python27\\\\share', 'C:\\\\Python27\\\\tcl\\\\tcl8.5', 'C:\\\\Python27\\\\Tools', 'C:\\\\Python27\\\\Lib\\\\site-packages', 'C:\\\\OSGeo4W\\\\bin', 'C:\\\\OSGeo4W\\\\bin\\\\python27.zip', 'C:\\\\Python27\\\\lib\\\\site-packages\\\\Orange\\\\orng', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\DLLs', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\plat-win', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\lib-tk', 'C:\\\\Users\\\\Tim\\\\AppData\\\\Roaming\\\\Python\\\\Python27\\\\site-packages', 'C:\\\\OSGeo4W\\\\apps\\\\Python27', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\GDAL-1.11.0-py2.7-win32.egg', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\PIL', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\win32', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\win32\\\\lib', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\Pythonwin', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\Shapely-1.2.18-py2.7-win32.egg', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\wx-2.8-msw-unicode']
You may well be right about conflicts. The default Python indication changes from application to application. I have a stand-alone Python 2.7.6 that I use for programming (note that QGIS thinks that the default is 2.7.4). You can see pathways for 'Orange' in the list. It seems to be looking at my general Python paths, and the self-contained Python paths. I'm not quite sure how to approach this.
#18 Updated by Nathan Woodrow over 10 years ago
I'm not sure why your version is picking up the extra stuff. The batch file that QGIS runs sets up it's own environment that it needs, including creating a new PATH variable, at least it should be. I have four version of QGIS installed and two standalone Pythons but they never conflict.
Open up a new cmd.exe instance and run this:
set
It will print all the variables that are defined for your system.
Do you see PYTHONPATH defined? If so it should not be.
#19 Updated by Tim Paysen over 10 years ago
Yes and PYTHONPATH is in there. I've seen conflicting opinions on whether or not it should be. Some applications look for it. Painfully, I'm including it here.
ALLUSERSPROFILE=C:\\ProgramData APPDATA=C:\\Users\\Tim\\AppData\\Roaming asl.log=Destination=file CLASSPATH=C:\\Program Files (x86)\\OpenOffice.org3\\URE\\java;C:\\Program Files (x86)\\OpenOffice.org3\\Basis\\program\\classes;C:\\jMusic\\jMusic1.6.3.jar;C:\\jMusic\\inst;C:\\jMusic\\lib\\jMusic1.6.3.jar;\\lib\\ext\\QTJava.zip;C:\\Program Files (x86)\\Java\\jdk1.8.0\\jre\\bin; C:\\Program Files (x86)\\Java\\jre8\\bin;C:\\Program Files\\Java\\jre8\\bin; C:\\Program Files\\Java\\jdk1.8.0\\jre\\bin;C:\\Program Files\\Java\\jdk1.8.0\\bin;C:\\Program Files (x86)\\Java\\jdk1.8.0\\bin; CommonProgramFiles=C:\\Program Files\\Common Files CommonProgramFiles(x86)=C:\\Program Files (x86)\\Common Files CommonProgramW6432=C:\\Program Files\\Common Files COMPUTERNAME=TIM-PC ComSpec=C:\\Windows\\system32\\cmd.exe DATAPLO$=C:\\Program Files (x86)\\Java\\jdk1.7.0_09;C:\\Program Files\\Java\\jdk1.7.0_02; DPDIR=C:\\Program Files (x86)\\NIST\\DATAPLOT\\ f95include=C:\\Program Files (x86)\\Silverfrost\\FTN95\\include FED$=C:\\Program Files (x86)\\NIST\\DATAPLOT\\ FP_NO_HOST_CHECK=NO GDAL_DATA=C:\\Program Files (x86)\\MapWindow\\GDAL_DATA GGOBI_HOME=C:\\Program Files (x86)\\ggobi GNUPLOT_LIB=C:\\Program Files (x86)\\gnuplot\\demo GS_PROG=C:\\gs\\gs9.01\\bin\\gswin64c.exe;C:\\gs\\gs8.71\\bin\\gswin32c.exe;C:\\Program File\\gs\\gs8.71\\bin; HOME=C:\\Users\\Tim HOMEDRIVE=C: HOMEPATH=\\Users\\Tim JAVA_HOME=C:\\Program Files (x86)\\Java\\jdk1.8.0\\bin;C:\\Program Files\\Java\\jdk1.8.0\\bin;C:\\Program Files (x86)\\Java\\jdk1.8.0\\jre\\bin\\client\\jvm.dll;C:\\Program Files\\Java\\jdk1.8.0\\jre\\bin\\server\\jvm.dll; C:\\Program Files (x86)\\Java\\jdk1.8.0\\bin;C:\\Program Files\\Java\\jdk1.8.0\\bin;C:\\Program Files (x86)\\Java\\jdk1.8.0\\jre\\bin\\client\\jvm.dll;C:\\Program Files\\Java\\jdk1.8.0\\jre\\bin\\server\\jvm.dll;\\bin\\javaw; JRE_HOME=C:\\Program Files\\Java\\jre8\\bin;C:\\Program Files (x86)\\Java\\jre8\\bin;C:\\Program Files (x86)\\Java\\jdk1.8.0\\jre\\bin;C:\\Program Files\\Java\\jre8\\bin; C:\\Program Files (x86)\\Java\\jdk1.8.0\\bin;C:\\Program Files\\Java\\jdk1.8.0\\bin;C:\\Program Files (x86)\\Java\\jdk1.8.0\\jre\\bin\\client\\jvm.dll;C:\\Program Files\\Java\\jdk1.8.0\\jre\\bin\\server\\jvm.dll;\\bin\\javaw; LOCALAPPDATA=C:\\Users\\Tim\\AppData\\Local LOGONSERVER=\\\\TIM-PC LUA_DEV=C:\\Program Files (x86)\\Lua\\5.1 LUA_PATH=;;C:\\Program Files (x86)\\Lua\\5.1\\lua\\?.luac mod_path=C:\\Program Files (x86)\\Silverfrost\\FTN95\\include MOZ_PLUGIN_PATH=C:\\Program Files (x86)\\Foxit Software\\Foxit Reader\\plugins\\ MWBATCHTEST=1 NUMBER_OF_PROCESSORS=4 OS=Windows_NT Path=C:\\Python27\\Lib\\site-packages\\PyQt4;C:\\Program Files\\Tcl\\bin;C:\\Program Files (x86)\\Tcl\\bin;C:\\Windows;C:\\Windows\\System32;C:\\Windows\\system;C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7;C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\Tools;C:\\Program Files (x86)\\Java\\jdk1.8.0\\bin;C:\\Program Files\\Java\\jdk1.8.0\\bin;C:\\Program Files (x86)\\Java\\jdk1.8.0\\jre\\bin\\client\\jvm.dll;C:\\Program Files\\Java\\jdk1.8.0\\jre\\bin\\server\\jvm.dll;C:\\Program Files\\Java\\jre8\\bin;C:\\Program Files (x86)\\Java\\jre8\\bin;C:\\Program Files (x86)\\Java\\jdk1.8.0\\jre\\bin;C:\\Program Files\\Java\\jre8\\bin;C:\\Python27\\Lib;C:\\Python27\\Lib\\site-packages;C:\\Python27\\Lib\\site-packages\\PyQt4\\bin;C:\\OSGeo4W\\apps\\Python27\\Lib\\site-packages\\PyQt4;C:\\Program Files (x86)\\QGIS Valmiera\\apps\\Python27\\Lib\\site-packages\\wx-2.8-msw-unicode;C:\\Program Files (x86)\\Calibre2\\;C:\\Program Files (x86)\\MySQL\\MySQL Utilities 1.3.6\\;C:\\Users\\Tim\\AppData\\Roaming\\Python27\\Scripts\\;C:\\MinGW\\bin\\;C:\\gcc-4.5.2\\;C:\\Program Files (x86)\\FreeMat\\bin\\;C:\\Users\\Tim\\AppData\\Roaming\\MiKTeX\\2.9\\miktex\\bin\\;C:\\FreeBASIC\\fbc.exe;C:\\MinGW\\bin\\;C:\\Program Files\\Tcl\\bin\\;C:\\Program Files\\Tcl\\lib\\;C:\\Program Files (x86)\\Tcl\\bin\\;C:\\Program Files (x86)\\Tcl\\lib\\;C:\\MinGW64\\bin\\;C:\\MinGW64\\x86_64-mingw32\\bin\\;C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Microsoft Visual C++ 2010 Express - ENU\\;C:\\Program Files (x86)\\LilyPond\\usr\\bin\\;C:\\abc2xml_v46\\;C:\\Program Files (x86)\\ggobi\\ggobi.exe;C:\\Program Files (x86)\\Google\\google_appengine\\;C:\\MinGW\\lib\\gcc\\mingw32\\4.8.1\\include\\c++\\mingw32\\bits\\;C:\\MinGW\\lib\\gcc\\mingw32\\4.8.1\\include\\;C:\\Python27\\;C:\\Program Files \\QGIS Valmiera\\apps\\qgis\\python\\qgis\\;C:\\php;C:\\Apache2.2\\bin\\;C:\\OSGeo4W\\bin\\;C:\\Python27\\Lib\\site-packages\\PyQt4\\sip\\;C:\\Python27\\;C:\\Python27\\Lib\\site-packages\ umpy\\;C:\\Python27\\tcl\\tcl8.5\\;C:\\Python27\\python.exe; C:\\Python27\\pythonw.exe;C:\\Python27\\Lib\\;C:\\Python27\\Lib\\idlelib\\;C:\\Python27\\Lib\\site-packages\\;C:\\Python27\\Lib\\site-packages\\PyQt4\\bin\\QtCore4.dll;C:\\Python27\\Lib\\site-packages\\Orange\\OrangeCanvas\\;C:\\Program Files\\QGIS Valmiera\\apps\\qgis\\python\\;C:\\Program Files\\QGIS Valmiera\\apps\\Python27\\sip\\;C:\\cairo_1.10.2-1_win32\\bin;C:\\cairo-dev_1.10.2-1_win32\\lib;C:\\GTK\\bin;C:\\Program Files (x86)\\Git\\bin;C:\\Program Files (x86)\\Git\\cmd;C:\\gdb-7.7\\gdb;C:\\Program Files (x86)\\Graphviz2.36\\bin;C:\\gcc-4.5.2\\gcc;C:\\MinGW\\bin\\mingw32-make.exe;C:\\Dev-Cpp\\bin\\make.exe;C:\\Python27\\Lib\\site-packages\\mlpy;C:\\Python27\\Lib\\site-packages\\libsvm;Python27\\Lib\\site-packages\\libsvm.dll;Python27\\Lib\\site.py;C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE;C:\\wxWidggets-3.0.0 PATHEXT=.PY;.SCM;.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.pyw;.tcl;.wlua;.lexe PROCESSOR_ARCHITECTURE=AMD64 PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 23 Stepping 7, GenuineIntel PROCESSOR_LEVEL=6 PROCESSOR_REVISION=1707 ProgramData=C:\\ProgramData ProgramFiles=C:\\Program Files ProgramFiles(x86)=C:\\Program Files (x86) ProgramW6432=C:\\Program Files PROJ_LIB=C:\\Program Files (x86)\\MapWindow\\PROJ_NAD PROMPT=$P$G PSModulePath=C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\;C:\\Program Files (x86)\\Microsoft SQL Server\\110\\Tools\\PowerShell\\Modules\\ PUBLIC=C:\\Users\\Public PYTHONPATH=C:\\Python27;C:\\Python27\\Lib;C:\\Python27\\DLLs;C:\\Python27\\Doc;C:\\Python27\\include;C:\\Python27\\libs;C:\\Python27\\Lib\\site-packages\\PyQt4;C:\\Python27\\Scripts;C:\\Python27\\share;C:\\Python27\\tcl\\tcl8.5;C:\\Python27\\Tools;C:\\Python27\\Lib\\site-packages;C:\\Python27\\DLLs; R_PROG=C:\\Program Files\\R\\R-3.0.2\\; SystemDrive=C: SystemRoot=C:\\Windows TCL_LIBRARY=C:\\Program Files\\Tcl\\lib\\tcl8.6;C:\\Program Files (x86)\\Tcl\\lib\\tcl8.6; TEMP=C:\\Users\\Tim\\AppData\\Local\\Temp TK_LIBRARY=C:\\Program Files\\Tcl\\lib\\tk8.6;C:\\Program Files (x86)\\Tcl\\lib\\tk8.6; TMP=C:\\Users\\Tim\\AppData\\Local\\Temp TRACKER_HOME=C:\\Program Files (x86)\\Tracker USERDOMAIN=Tim-PC USERNAME=Tim USERPROFILE=C:\\Users\\Tim VBOX_INSTALL_PATH=C:\\Program Files\\Oracle\\VirtualBox\\ VS100COMNTOOLS=C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\Tools\\ VS110COMNTOOLS=C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\Common7\\Tools\\ VS120COMNTOOLS=C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\Tools\\ VS90COMNTOOLS=C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\Common7\\Tools\\ windir=C:\\Windows XDP_CODE=C:\\Program Files (x86)\\NIST\\DATAPLOT\\FRSCRIPT XDP_FILE=C:\\Program Files (x86)\\NIST\\DATAPLOT\\FRMENUS XUGGLE_HOME=C:\\Program Files (x86)\\Xuggle
#20 Updated by Jürgen Fischer over 10 years ago
- Subject changed from Failed to open Python console to hostnames with non-ascii characters cause python console to fail.
#21 Updated by Matthias Kuhn about 9 years ago
- Status changed from Feedback to Closed
Fixed in 9fc1b48b