Hacker News new | past | comments | ask | show | jobs | submit login

In general, activating a conda environment _should_ override your PATH to include the environment's local, contained copy of both python and pip. As such, using pip install x in a conda environment will install those dependencies using your conda environment's python/pip, not your global python/pip.

On bash, you would test this like:

```sh

> conda activate env-name

> which python

$ # should be your local conda env path

> which pip

$ # should also be your local conda env, not global pip

```

If it _is_ using your global pip, that means somehow your PATH isn't being set properly. This is common with conda on windows, although I'm not certain why exactly.

The reason they are using pip inside of conda instead of conda may be because CUDA needs dependencies which are not found in conda's repositories, or simply due to personal preference.




Ah. Now I understand. That's very helpful and I now know where to start looking.


No problem! Good luck. If you can find where your conda-env's python _should_ be, you can invoke it manually to mitigate the issue.

For instance:

/home/user/.miniconda/envs/my-env/bin/python3.8 -m pip install <x>




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: