how to install pyenv-virtualenv on windows

10,991 views
Skip to first unread message

Sohail Tanveer

unread,
Jan 9, 2021, 7:55:06 PM1/9/21
to Django users
im facing difficulty to install pyenv-virtual env on my windows 10
i googled it several times but it directs me to a git repo where there is an installation process but is of no use because, the command that is displayed is not working in my cmd 
please help me out

Luciano Martins

unread,
Jan 10, 2021, 6:22:24 AM1/10/21
to Django users
Look I gave up trying on windows and use virtualenv same.

Atuma Samuel

unread,
Jan 10, 2021, 8:43:39 AM1/10/21
to django...@googlegroups.com
I don't know if this answers your question, but you can try

$ python -m venv env

env is the name of the virtual environment and can be replaced with any name of your choice.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1a73a4b5-b12e-473b-9018-be14e584381en%40googlegroups.com.

Kasper Laudrup

unread,
Jan 10, 2021, 9:50:02 AM1/10/21
to django...@googlegroups.com
It would greatly improve your chances of getting some useful help if you
clarify which git repo you are talking about, which command you are
trying to using and what exactly you mean by "not working".

Unless you want to leave that as an exercise for the reader.

Kind regards,

Kasper Laudrup

Kunal Solanke

unread,
Jan 10, 2021, 10:00:30 AM1/10/21
to django...@googlegroups.com
I recently started using pipenv, but still I can say its best thing so far I have used for storing env variables,creating venv and etc,with one simple command your virtualenv will be activated,without having to worry about where your venv files are ,path and etc .
Have a look at it. What do you think about pipenv Kasper?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a9d0924c-2906-c97a-3a76-12f06190a188%40stacktrace.dk.

ramadhan ngallen

unread,
Jan 10, 2021, 10:29:39 AM1/10/21
to 'MH' via Django users
Alternatively, You can use virtualenvwrapper-win

Sohail Tanveer

unread,
Jan 10, 2021, 11:27:57 AM1/10/21
to Django users
the git repo to which google directs me is https://github.com/pyenv/pyenv-virtualenv
the command it wants me to execute in my cmd is   $ git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv 
and whenever i execute this it shows an error like 



fatal: Too many arguments.

usage: git clone [<options>] [--] <repo> [<dir>]

    -v, --verbose         be more verbose
    -q, --quiet           be more quiet
    --progress            force progress reporting
    -n, --no-checkout     don't create a checkout
    --bare                create a bare repository
    --mirror              create a mirror repository (implies bare)
    -l, --local           to clone from a local repository
    --no-hardlinks        don't use local hardlinks, always copy  
    -s, --shared          setup as shared repository
    --recurse-submodules[=<pathspec>]
                          initialize submodules in the clone      
    --recursive ...       alias of --recurse-submodules
    -j, --jobs <n>        number of submodules cloned in parallel 
    --template <template-directory>
                          directory from which templates will be used
    --reference <repo>    reference repository
    --reference-if-able <repo>
                          reference repository
    --dissociate          use --reference only while cloning      
    -o, --origin <name>   use <name> instead of 'origin' to track 
upstream
    -b, --branch <branch>
                          checkout <branch> instead of the remote's HEAD
    -u, --upload-pack <path>
                          path to git-upload-pack on the remote   
    --depth <depth>       create a shallow clone of that depth    
    --shallow-since <time>
                          create a shallow clone since a specific 
time
    --shallow-exclude <revision>
                          deepen history of shallow clone, excluding rev
    --single-branch       clone only one branch, HEAD or --branch 
    --no-tags             don't clone any tags, and make later fetches not to follow them
    --shallow-submodules  any cloned submodules will be shallow   
    --separate-git-dir <gitdir>
                          separate git dir from working tree      
    -c, --config <key=value>
                          set config inside the new repository    
    --server-option <server-specific>
                          option to transmit
    -4, --ipv4            use IPv4 addresses only
    -6, --ipv6            use IPv6 addresses only
    --filter <args>       object filtering
    --remote-submodules   any cloned submodules will use their remote-tracking branch
    --sparse              initialize sparse-checkout file to include only files at root 

Gerardo Palazuelos Guerrero

unread,
Jan 10, 2021, 11:46:43 AM1/10/21
to django...@googlegroups.com
Hi Sohail,
I read your interest for pipenv in Windows. Seems are wasting precious time and not productive because of this pipenv tool, which is not even the point of Django.

If that keeps resulting complicated, may I suggest you to use venv which comes integrated in recent Python installation. You have to install nothing else other than Python.

I code Python in Windows using venv - no issues.

In your desired folder, to create virtual environment:
python -m venv the-name-of-my-virtual environment 

Usually I do this (yes, I put a dot in name of my virtual environment):
python -m venv .venv

Then, using gitbash, to activate virtual environment in Windows (assuming you are in same desired folder):
. \.venv\Scripts\activate

If not using gitbash, enter to folder .venv\Scripts and run activate - it’s a .bat program 

That should work.
Regards,

---
Gerardo



El 10 ene 2021, a la(s) 9:28, Sohail Tanveer <sohailta...@gmail.com> escribió:

the git repo to which google directs me is https://github.com/pyenv/pyenv-virtualenv
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

Kasper Laudrup

unread,
Jan 10, 2021, 11:50:02 AM1/10/21
to django...@googlegroups.com
On 10/01/2021 15.59, Kunal Solanke wrote:
> Have a look at it. What do you think about pipenv Kasper?
>

I don't think I've ever had a need for it. Using the standard venv
python module has been fine for my needs so far, but I'll keep it in
mind. Thanks.

Kind regards,

Kasper Laudrup

Sohail Tanveer

unread,
Jan 10, 2021, 12:00:05 PM1/10/21
to Django users
i was actually going through a tutorial where i specifically needed pyenv-virtualenv. 
but thanks for ur consideration @gerardo.palazuelos

Kasper Laudrup

unread,
Jan 10, 2021, 12:05:02 PM1/10/21
to django...@googlegroups.com
On 10/01/2021 17.27, Sohail Tanveer wrote:
> the git repo to which google directs me
> is https://github.com/pyenv/pyenv-virtualenv

The first line of the readme says:

"pyenv-virtualenv is a pyenv plugin that provides features to manage
virtualenvs and conda environments for Python on UNIX-like systems."

Windows is not a "UNIX-like system" so what made you think you could use
that on Windows?

An ever better question is probably, what made you want to use
pyenv-virtualenv on Windows in the first place?

There are probably better solutions as someone else has already
commented, but it's probably easier for someone to help you if you let
them know what you are trying to accomplish. I don't assume you're
trying to port pyenv-virtualenv to Windows.


> the command it wants me to execute in my cmd is $ git clone
> https://github.com/pyenv/pyenv-virtualenv.git $(pyenv
> root)/plugins/pyenv-virtualenv
> and whenever i execute this it shows an error like
>

That's because that's a UNIX shell command, although I'm not sure if the
$() syntax is standard. Anyway, that's not going to work in your DOS cmd
shell and I doubt changing to a more sane command shell is going to help
you.

So the short answer to your original question "how to install
pyenv-virtualenv in Windows?" seems to be, "you don't".

Kind regards,

Kasper Laudrup
Reply all
Reply to author
Forward
0 new messages