noamraph / dreampie

DreamPie - The Python shell you've always dreamed about!
www.dreampie.org
GNU General Public License v3.0
233 stars 52 forks source link

sys.path is missing library directories in Python 3 #68

Closed nickjacobson closed 8 years ago

nickjacobson commented 8 years ago

What steps will reproduce the problem?

  1. Install ActiveState Python 3.4.3.2
  2. In Start menu select DreamPie > Add Intepreter and choose C:\Python34\python.exe
  3. Open a DreamPie window
  4. import sys
  5. print(sys.path)

What is the expected result? sys.path should by default contain 'C:\Python34\lib\site-packages', 'C:\Python34\lib\site-packages\win32', 'C:\Python34\lib\site-packages\win32\lib', and 'C:\Python34\lib\site-packages\PythonWin'. (DreamPie for Python 2.7 does contain the corresponding entries.)

What happens instead? It only returns: ['', 'C:\Program Files (x86)\DreamPie\data', 'C:\Windows\system32\python34.zip', 'C:\Python34\DLLs', 'C:\Python34\lib', 'C:\Python34'], so the library entries are missing.

Therefore, 3rd party libraries can't be imported until the directories are added to sys.path, every time.

Please provide any additional information below. To submit a screenshot, you can go to imgur.com, upload the image, and paste the URL.

Note that in the Python Interactive Shell for Python 3.4, sys.path by default contains: ['', 'C:\Windows\system32\python34.zip', 'C:\Python34\DLLs', 'C:\Python34\lib', 'C:\Python34', 'C:\Python34\lib\site-packages', 'C:\Python34\lib\site-packages\win32', 'C:\Python34\lib\site-packages\win32\lib', 'C:\Python34\lib\site-packages\Pythonwin']. This is what Dreampie's sys.path should be too.


Diagnostic information:

DreamPie version: 1.2.1 git commit: None from 2016/06/03 platform: Windows-2008ServerR2-6.1.7601-SP1 architecture: ('32bit', 'WindowsPE') python_version: 2.7.3 python_implementation: CPython executable: C:\Program Files (x86)\DreamPie\dreampie.exe subprocess executable: C:\Python34\python.exe subprocess description: Python 3.4.3 (default, Aug 21 2015, 11:25:47) [MSC v.1600 64 bit (AMD64)] on win32

nickjacobson commented 8 years ago

This is a duplicate of https://github.com/noamraph/dreampie/issues/48