Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong pip when path contains non-ASCII characters #1392

Synxis opened this issue Jul 24, 2019 · 0 comments


Copy link

commented Jul 24, 2019

My issue is somehow related to #457. If the folder in which the virtualenv is created contains non-ASCII characters (such as è), the wrong pip will be activated.

Steps to reproduce

On windows 7 and 10 64bits.

  1. Create a virtualenv; no errors here

    D:\Projects\Thèse\distributed>virtualenv venv
    Using base prefix 'd:\\program files\\python\\37'
    New python executable in D:\Projects\Thèse\distributed\venv\Scripts\python.exe
    Installing setuptools, pip, wheel...done.
  2. Activate the virtualenv

    (venv) D:\Projects\Thèse\distributed>
  3. Wrong pip:

    (venv) D:\Projects\Thèse\distributed>pip --version
    pip 19.2.1 from d:\program files\python\37\lib\site-packages\pip (python 3.7)


    (venv) D:\Projects\Thèse\distributed>pip --version
    pip 19.2.1 from d:\project\thèse\distributed\venv\lib\site-packages\pip (python 3.7)

The effect is that any installation goes to the general environment, not the virtual environment.

Possible cause & solution

This comes from the encoding of activate.bat, which is not explicitely specified. Either this file must have the oem encoding (might be Windows-1252, CP850, etc...) or it should explicitely set one at first (and set the original code page back at the end):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.