virtualenv on Windows10 gives error:The path python3 does not exist

后端 未结 4 1091
再見小時候
再見小時候 2021-02-15 03:47

I\'m trying the tutorial Using Cloud Datastore with Python, but when I run:

virtualenv -p python3 env

I got an error:

The path          


        
相关标签:
4条回答
  • 2021-02-15 04:22

    Use something like this: virtualenv --python "Your python.exe path" 'Name of your virtual folder'. You can take your python.exe path from your environment variables which is in properties of your 'This PC' or 'My Computer'.

    Then get into the folder and run the command: .\Scripts\activate

    Enter the command pip freeze to make sure you have created your virtual environment successfully! It should return nothing since it is like an empty basket. Look at how it comes in the picture.

    0 讨论(0)
  • 2021-02-15 04:31

    If python --V is showing a version greater than 3, then why not try:

    virtualenv -p python env
    

    instead? The value of the p flag is simply referring to the version of python you're wanting to create the virtual environment with. In this case, python is greater than version 3.

    0 讨论(0)
  • 2021-02-15 04:32

    After reading this tutorial, I found the workaround for my case:

    virtualenv --python "C:\\Anaconda3\\python.exe" env
    
    0 讨论(0)
  • 2021-02-15 04:47

    Just a comment: On my Win10, for python3 scripts, I run py c:\path\to\script.
    For example:

    py -m pip --version
    

    So to make the above command work, I used:

    py -m venv env
    

    and:

    virtualenv -p py env
    

    So that could be a possible solution as well.

    0 讨论(0)
提交回复
热议问题