0

So my question is about where is it?

And is where any way to change that?

Something goes wrong on my Windows 8 machine.

PYTHONPATH=C:\Python27;C:\Python27\Lib

Output from python:

>>> import sys
>>> sys.prefix
'C:\\Python27'

Same here:

python -c "import sys; print sys.prefix"
C:\Python27

From ipython:

ipython -c "import sys; print sys.prefix"

Defaulting color scheme to 'NoColor'
c:\Python27 # low c

And finally I have trouble with virtualenv:

Traceback (most recent call last):
  File "C:\Python27\Lib\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Python27\Lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\Scripts\virtualenv.exe\__main__.py", line 9, in <module>
  File "c:\python27\lib\site-packages\virtualenv.py", line 832, in main
    symlink=options.symlink)
  File "c:\python27\lib\site-packages\virtualenv.py", line 994, in create_environment
    site_packages=site_packages, clear=clear, symlink=symlink))
  File "c:\python27\lib\site-packages\virtualenv.py", line 1192, in install_python
    copy_required_modules(home_dir, symlink)
  File "c:\python27\lib\site-packages\virtualenv.py", line 1130, in copy_required_modules
    dst_filename = change_prefix(filename, dst_prefix)
  File "c:\python27\lib\site-packages\virtualenv.py", line 1095, in change_prefix
    (filename, prefixes)
AssertionError: Filename C:\Python27\Lib\os.py does not start with any of these prefixes: ['c:\\python27']

Why they are different?

So fast solution is just to change PYTHONPATH with low 'c', it seems ugly.

xiº
  • 4,605
  • 3
  • 28
  • 39

0 Answers0