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

Unable to create a venv virtual environment inside a conda python 3.7.3 environment on Windows #8527

Closed
ghost opened this issue Apr 9, 2019 · 6 comments
Labels
locked [bot] locked due to inactivity

Comments

@ghost
Copy link

ghost commented Apr 9, 2019

Current Behavior

Unable to create a venv virtual environment inside a conda python 3.7.3 environment on windows. Can create a venv virtual environment inside a conda python 3.7.2 (and earlier) environment.

Steps to Reproduce

With a Python 3.7.3 conda environment:

(base) C:\Users\IEUser>conda create --name=py373 python=3.7.3 -y
Solving environment: done
<...output snipped...>
#
# To activate this environment, use
#
#     $ conda activate py373
#
# To deactivate an active environment, use
#
#     $ conda deactivate


(base) C:\Users\IEUser>conda activate py373

(py373) C:\Users\IEUser>python -V
Python 3.7.3

(py373) C:\Users\IEUser>python -m venv foo
Error: [Errno 2] No such file or directory: 'C:\\Users\\IEUser\\Miniconda3\\envs\\py373\\lib\\venv\\scripts\\nt\\python.exe'

(py373) C:\Users\IEUser>

With a Python 3.7.2 conda environment:

(base) C:\Users\IEUser>conda create --name=py372 python=3.7.2 -y
Solving environment: done
<...output snipped...>
#
# To activate this environment, use
#
#     $ conda activate py372
#
# To deactivate an active environment, use
#
#     $ conda deactivate


(base) C:\Users\IEUser>conda activate py372

(py372) C:\Users\IEUser>python -V
Python 3.7.2

(py372) C:\Users\IEUser>python -m venv foo

(py372) C:\Users\IEUser>dir foo\
 Volume in drive C is Windows 10
 Volume Serial Number is B4A6-FEC6

 Directory of C:\Users\IEUser\foo

04/09/2019  03:46 AM    <DIR>          .
04/09/2019  03:46 AM    <DIR>          ..
04/09/2019  03:46 AM    <DIR>          Include
04/09/2019  03:46 AM    <DIR>          Lib
04/09/2019  03:49 AM               101 pyvenv.cfg
04/09/2019  03:49 AM    <DIR>          Scripts
               1 File(s)            101 bytes
               5 Dir(s)  24,427,130,880 bytes free

(py372) C:\Users\IEUser>

Expected Behavior

A python venv virtual environment should be created (see example with the conda python 3.7.2 environment above).

Environment Information

`conda info`

(py373) C:\Users\IEUser>conda info

     active environment : py373
    active env location : C:\Users\IEUser\Miniconda3\envs\py373
            shell level : 2
       user config file : C:\Users\IEUser\.condarc
 populated config files :
          conda version : 4.5.12
    conda-build version : not installed
         python version : 3.7.1.final.0
       base environment : C:\Users\IEUser\Miniconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/win-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/pro/win-64
                          https://repo.anaconda.com/pkgs/pro/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Users\IEUser\Miniconda3\pkgs
                          C:\Users\IEUser\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\IEUser\Miniconda3\envs
                          C:\Users\IEUser\AppData\Local\conda\conda\envs
                          C:\Users\IEUser\.conda\envs
               platform : win-64
             user-agent : conda/4.5.12 requests/2.21.0 CPython/3.7.1 Windows/10 Windows/10.0.17763
          administrator : False
             netrc file : None
           offline mode : False

`conda config --show-sources`

(py373) C:\Users\IEUser>conda config --show-sources


(py373) C:\Users\IEUser>

`conda list --show-channel-urls`

(py373) C:\Users\IEUser>conda list --show-channel-urls
# packages in environment at C:\Users\IEUser\Miniconda3\envs\py373:
#
# Name                    Version                   Build  Channel
ca-certificates           2019.1.23                     0    defaults
certifi                   2019.3.9                 py37_0    defaults
openssl                   1.1.1b               he774522_1    defaults
pip                       19.0.3                   py37_0    defaults
python                    3.7.3                h8c8aaf0_0    defaults
setuptools                40.8.0                   py37_0    defaults
sqlite                    3.27.2               he774522_0    defaults
vc                        14.1                 h0510ff6_4    defaults
vs2015_runtime            14.15.26706          h3a45250_0    defaults
wheel                     0.33.1                   py37_0    defaults
wincertstore              0.2                      py37_0    defaults

(py373) C:\Users\IEUser>

@ghost ghost changed the title Unable to create a venv virtual environment inside a conda python 3.7.3 environment Unable to create a venv virtual environment inside a conda python 3.7.3 environment on Windows Apr 9, 2019
@soapy1
Copy link
Contributor

soapy1 commented Apr 24, 2019

This should be fixed in the latest version of conda (4.6.14) conda update conda -y

@nakhan98
Copy link

Hi @soapy1, I was the reporter above. I'm still getting the problem when I upgrade to latest version of conda:

(base) C:\Users\IEUser>conda update conda -y
Collecting package metadata: done
Solving environment: done

# All requested packages already installed.


(base) C:\Users\IEUser>conda create --name=py373 python=3.7.3 -y
Collecting package metadata: done
Solving environment: done

## Package Plan ##

  environment location: C:\Users\IEUser\Miniconda3\envs\py373

  added / updated specs:
    - python=3.7.3


The following NEW packages will be INSTALLED:

  ca-certificates    pkgs/main/win-64::ca-certificates-2019.1.23-0
  certifi            pkgs/main/win-64::certifi-2019.3.9-py37_0
  openssl            pkgs/main/win-64::openssl-1.1.1b-he774522_1
  pip                pkgs/main/win-64::pip-19.0.3-py37_0
  python             pkgs/main/win-64::python-3.7.3-h8c8aaf0_0
  setuptools         pkgs/main/win-64::setuptools-41.0.0-py37_0
  sqlite             pkgs/main/win-64::sqlite-3.28.0-he774522_0
  vc                 pkgs/main/win-64::vc-14.1-h0510ff6_4
  vs2015_runtime     pkgs/main/win-64::vs2015_runtime-14.15.26706-h3a45250_0
  wheel              pkgs/main/win-64::wheel-0.33.1-py37_0
  wincertstore       pkgs/main/win-64::wincertstore-0.2-py37_0


Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate py373
#
# To deactivate an active environment, use
#
#     $ conda deactivate


(base) C:\Users\IEUser>conda activate py373

(py373) C:\Users\IEUser>python -V
Python 3.7.3

(py373) C:\Users\IEUser>python -m venv foo
Error: [Errno 2] No such file or directory: 'C:\\Users\\IEUser\\Miniconda3\\envs\\py373\\lib\\venv\\scripts\\nt\\python.exe'

(py373) C:\Users\IEUser>conda info

     active environment : py373
    active env location : C:\Users\IEUser\Miniconda3\envs\py373
            shell level : 2
       user config file : C:\Users\IEUser\.condarc
 populated config files :
          conda version : 4.6.14
    conda-build version : not installed
         python version : 3.7.1.final.0
       base environment : C:\Users\IEUser\Miniconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/win-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Users\IEUser\Miniconda3\pkgs
                          C:\Users\IEUser\.conda\pkgs
                          C:\Users\IEUser\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\IEUser\Miniconda3\envs
                          C:\Users\IEUser\.conda\envs
                          C:\Users\IEUser\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.6.14 requests/2.21.0 CPython/3.7.1 Windows/10 Windows/10.0.17763
          administrator : False
             netrc file : None
           offline mode : False

@soapy1
Copy link
Contributor

soapy1 commented Apr 24, 2019

Did a bit more digging, and I think I'm definitely wrong. Related to ContinuumIO/anaconda-issues#10822

@nakhan98
Copy link

Thanks for checking. Yes, it appears to be the same issue. Feel free to close this issue.

@msarahan
Copy link
Contributor

closing to consolidate at ContinuumIO/anaconda-issues#10822

@github-actions
Copy link

github-actions bot commented Sep 1, 2021

Hi there, thank you for your contribution to Conda!

This issue has been automatically locked since it has not had recent activity after it was closed.

Please open a new issue if needed.

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Sep 1, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity
Projects
None yet
Development

No branches or pull requests

3 participants