Skip to content

bug: Unable to install using cmd prompt on windows 10 #303

Closed

Description

@leegibbons6point6

Unable to install
Following the install instructions I get an error and I am unsure why ?.
The error obtained is "unable to install - error Can not combine '--user' and '--target' "
Yet I am not using --user so this doesn't make sense.

To Reproduce
Steps to reproduce the behavior:

Go to a 'cmd' prompt
Enter 'pip install pyenv-win --target %USERPROFILE%.pyenv'
Error displayed - ERROR: Can not combine '--user' and '--target'
Expected behavior
Pyenv-win to be installed

Additional context
It is windows 10 pro, username and so the contents of %USERPROFILE% does contain a space - wondered if this was a contributing factor.

Environment
I am using
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.19042 N/A Build 19042
and
Python 3.9.6

Activity

  1. mrlreable commented on Oct 20, 2021

    @mrlreable

    Hi @leegibbons6point6

    I encountered the same issue recently. I suggest you to use a virtual environment to install pyenv (it worked for me at least).
    You just simply create a virtual environment using python -m venv /path/to/new/virtual/environment
    Then activate the venv using Scripts\activate
    Finally you can just simply pip install like the first time.

    Note that using pip install in a virtual environment causes that you can only use the installed module within that same active environment.

    Hope it helps!

  2. jpmn commented on Nov 17, 2021

    @jpmn

    I could circumvent this issue on Windows 10 by adding --no-user at the end of the pip command in powershell.

    pip install pyenv-win --target $env:USERPROFILE\\.pyenv --no-user --upgrade
    Collecting pyenv-win
      Using cached pyenv_win-2.64.11-py3-none-any.whl (44 kB)
    Installing collected packages: pyenv-win
    Successfully installed pyenv-win-2.64.11
  3. kirankotari commented on May 30, 2022

    @kirankotari
    Member

    I could circumvent this issue on Windows 10 by adding --no-user at the end of the pip command in powershell.

    pip install pyenv-win --target $env:USERPROFILE\\.pyenv --no-user --upgrade
    Collecting pyenv-win
      Using cached pyenv_win-2.64.11-py3-none-any.whl (44 kB)
    Installing collected packages: pyenv-win
    Successfully installed pyenv-win-2.64.11
    

    @jpmn Hey you made my day. Let me add this is README

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions