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
pip install fails in conda create
virtual environments (but not in base environment)
#8691
Comments
I had the same problem while specifying a version of python when setting up the virtualenv (working with WSL):
This would create a env with python 3.7.7 while my base python is 3.7.6. I also had the problem trying with a lower version (3.5) of python for the virtualenv. I could get pip to install packages only with the same version of python in the base env and the virtualenv. |
I have the same issue and was only able to do |
I also have the exact same issue and SongweiGe's solution is the only one that works. After creating a new environment I need to force reinstall the version of pip in the base environment. I'm behind a corporate firewall, if that makes a difference. |
Same issue here |
Hi, I faced the same issue when trying to use pip in a newly created conda environment. I am also behind a corporate firewall.I realised that I was using different versions of pip and python in my created environment as compared to the base environment. I tried the solutions provided by @songweige and @bgrosjea and it works , although the solution with Python 3.8.3 and pip 21.0.1 in both base and created conda environment was failing. I finally reinstalled conda with Python 3.8.3 and an earlier version of pip (pip 20.1.1) and applied the same conditions for the created conda environment. Everything works fine now. |
Hi, I met the same issue today. And in my case, I finally found that this issue might be caused by different |
Same issue. Problem was with the pip version in the Venv. I tried to use the same python version as the base environment still I had the same problem. After downgrading the pip to one version prior, I did not face any warnings. |
Also for me downgrading pip was the solution
…On Thu, 13 May 2021 at 8:54 ashvinmanoj ***@***.***> wrote:
Same issue. Problem was with the pip version in the Venv. I tried to use
the same python version as the base environment still I had the same
problem. After downgrading the pip to one version prior, I did not face any
warnings.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8691 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABWSOM3OF32IA3NILLUVRBTTNNSP5ANCNFSM4HN5PRYQ>
.
|
The same problem with me in conda env of python 3.7 . I solve this problem by two way:
|
I have the same issue and was only able to do pip install when the versions are consistent with the python in base env. And this method works for me. |
Would you please provide where the solution link is? I can't find where it is. |
I had the same problem... Inspired by this thread, I try to replace the pip of virtual env by pip of base env. And, It works for me.
|
Same issue here without a corporate firewall. Comes and goes seemingly at random, occasionally works again just by relogging into WSL. I tried creating a symlink from the base environment to a new environment with the same python version but no luck. I also tried zhtisi's solution above with no cigar (still picks up the pip from the environments /bin, not sure if I was supposed to do some cleaning there as well for that to work). :( |
Same problem here, but not sure if it is related to what is installed in base or having a firewall. What worked for me is creating a new environment with a lower version of python:
|
my problem went away after updating to a new version of anaconda:
(which updated |
Thanks for the update - I tried updating to conda 4.13.0 per your command but problem unfortunately persists. The issue only occurs for me now with some packages (e.g. pycairo) and works fine with most. Pip installs everything fine until it runs into one of these "problem" packages and after that stops working for anything at all in that environment. |
For me the conda environment worked in WSL Debian for quite some time. Then if you remove it using the correct command "conda env remove -n my_environ" it doesn't work on recreation. However, if I create a new environment with a new name: "conda create -n my_environ2 python=3.9" it mostly doesn't work, however if I create using: "conda create -n my_environ2" pip works perfectly. So, there is something really strange going on. Sometimes it resolves itself a day later and just goes away. I am not using proxy, just a home computer. If it was a proxy issue, or firewall issue, then the second form of environment creation would not succeed (I reckon, could be wrong on this). I'm convinced its some sort of lease, lock or timeout issue that resolves itself given not running the environment for sometime. |
For me the solution was very firewall specific, I just needed to route both
http_proxy and https_proxy to the same proxy server.
…On Sun, Mar 27, 2022 at 12:00 AM wook2014 ***@***.***> wrote:
Hi,
I faced the same issue when trying to use pip in a newly created conda
environment. I am also behind a corporate firewall.I realised that I was
using different versions of pip and python in my created environment as
compared to the base environment. I tried the solutions provided by
@songweige <https://github.com/SongweiGe> and @bgrosjea
<https://github.com/bgrosjea> and it works , although the solution with
Python 3.8.3 and pip 21.0.1 in both base and created conda environment was
failing. I finally reinstalled conda with Python 3.8.3 and an earlier
version of pip (pip 20.1.1) and applied the same conditions for the created
conda environment. Everything works fine now.
Would you please provide where the solution link is? I can't find where it
is.
—
Reply to this email directly, view it on GitHub
<#8691 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABWSOMZSWHGPXVV5F5WUO33VB53ILANCNFSM4HN5PRYQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I met the same problem and solved by installing the same version of python as suggested above. More details: |
Hello gys. the acual solution could be very simple. I solved my problem using the conda package manager to install pip inside the virtual env with the command conda install pip and then I installed my packages with pip install and everything worked. |
Hello!
I am trying to
pip install
packages into conda virtual environments (i.e. ones created withconda create
) and getting(this happens whether I try to install a package from pypi like black, or directly from a git repo via
git+ssh
(my actual end-goal).I am able to
pip install
in thebase
environment, but I cannotpip install
in environments created byconda create
. I can alsopip install
into environments that were created withvenv
/virtualenv
.I've done a bit of digging into this issue. It usually happens to me when I'm behind a corporate firewall, but I'm not at the moment.
This is the closest thing I've been able to find to the problem I'm running into. The OP said that they resolved the issue by no longer creating virtual environments on remote drives. This makes me think that this might have something to do with the fact that I'm running this on WSL Ubuntu.
Any idea what the issue might be?
Thanks either way :)
p.s.
If I have time, I'll try reproducing this on another windows computer.
Steps to Reproduce
Environment Information
`conda info`
Base `conda info`: ``` active environment : base active env location : /home/zdufour/miniconda3 shell level : 1 user config file : /home/zdufour/.condarc populated config files : conda version : 4.6.14 conda-build version : not installed python version : 3.7.3.final.0 base environment : /home/zdufour/miniconda3 (writable) channel URLs : https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/free/linux-64 https://repo.anaconda.com/pkgs/free/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /home/zdufour/miniconda3/pkgs /home/zdufour/.conda/pkgs envs directories : /home/zdufour/miniconda3/envs /home/zdufour/.conda/envs platform : linux-64 user-agent : conda/4.6.14 requests/2.21.0 CPython/3.7.3 Linux/4.4.0-17763-Microsoft ubuntu/18.04.1 glibc/2.27 UID:GID : 1000:1000 netrc file : None offline mode : False ```
`conda config --show-sources`
`conda list --show-channel-urls`
``` # packages in environment at /home/zdufour/miniconda3: # # Name Version Build Channel anaconda-client 1.7.2 py37_0 defaults anaconda-project 0.8.2 py37_0 defaults appdirs 1.4.3 pypi_0 pypi asn1crypto 0.24.0 py37_0 defaults astroid 2.2.5 pypi_0 pypi attrs 19.1.0 py37_1 defaults black 19.3b0 pypi_0 pypi ca-certificates 2019.1.23 0 defaults certifi 2019.3.9 py37_0 defaults cffi 1.12.2 py37h2e261b9_1 defaults chardet 3.0.4 py37_1 defaults click 7.0 pypi_0 pypi clyent 1.2.2 py37_1 defaults conda 4.6.14 py37_0 defaults cryptography 2.6.1 py37h1ba5d50_0 defaults decorator 4.4.0 py37_1 defaults filelock 3.0.10 pypi_0 pypi idna 2.8 py37_0 defaults ipython_genutils 0.2.0 py37_0 defaults isort 4.3.20 pypi_0 pypi jsonschema 3.0.1 py37_0 defaults jupyter_core 4.4.0 py37_0 defaults lazy-object-proxy 1.4.1 pypi_0 pypi libedit 3.1.20181209 hc058e9b_0 defaults libffi 3.2.1 hd88cf55_4 defaults libgcc-ng 8.2.0 hdf63c60_1 defaults libstdcxx-ng 8.2.0 hdf63c60_1 defaults mccabe 0.6.1 pypi_0 pypi nbformat 4.4.0 py37_0 defaults ncurses 6.1 he6710b0_1 defaults openssl 1.1.1b h7b6447c_1 defaults pip 19.0.3 py37_0 defaults pluggy 0.11.0 pypi_0 pypi py 1.8.0 pypi_0 pypi pycosat 0.6.3 py37h14c3975_0 defaults pycparser 2.19 py37_0 defaults pylint 2.3.1 pypi_0 pypi pyopenssl 19.0.0 py37_0 defaults pyrsistent 0.14.11 py37h7b6447c_0 defaults pysocks 1.6.8 py37_0 defaults python 3.7.3 h0371630_0 defaults python-dateutil 2.8.0 py37_0 defaults pytz 2019.1 py_0 defaults pyyaml 5.1 py37h7b6447c_0 defaults readline 7.0 h7b6447c_5 defaults requests 2.21.0 py37_0 defaults ruamel_yaml 0.15.46 py37h14c3975_0 defaults setuptools 41.0.0 py37_0 defaults six 1.12.0 py37_0 defaults sqlite 3.27.2 h7b6447c_0 defaults tk 8.6.8 hbc83047_0 defaults toml 0.10.0 pypi_0 pypi tornado 6.0.2 py37h7b6447c_0 defaults tox 3.11.1 pypi_0 pypi tox-conda 0.2.0 pypi_0 pypi traitlets 4.3.2 py37_0 defaults typed-ast 1.3.5 pypi_0 pypi urllib3 1.24.1 py37_0 defaults virtualenv 16.6.0 pypi_0 pypi wheel 0.33.1 py37_0 defaults wrapt 1.11.1 pypi_0 pypi xz 5.2.4 h14c3975_4 defaults yaml 0.1.7 had09818_2 defaults zlib 1.2.11 h7b6447c_3 defaults ```
The text was updated successfully, but these errors were encountered: