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

Only if you choose to, same as on Windows, and it's _highly_ discouraged on both. I haven't read the README but culturally, even if someone uses just `python3` in documentation, they still probably expect you to understand how to do so inside of a virtual environment of some sort.

You can still use conda envs/venv/poetry on Linux, after all.

edit: re-reading your question, it sounds like you're in PATH hell. You should examine the contents of your PATH environment variable and make sure you don't have conflicting installations of python.




I'm not sure but I think you've misunderstood my point.

The readme gives specific steps to install including the creation of a conda environment.

It also uses pip directly which results in stuff being installed into site-packages.

Now - I presume conda is capable of handling this but for some reason it's not done that way. I'm familiar with virtualenv but not with conda so I'm not sure how I'd go about doing this correctly and I'm also not sure if the author had a good reason not do it this way in the readme.

So - I'm simply asking "Why is some stuff isolated and other parts not?"

My hunch is that the author doesn't care about virtualenvs/isolation and is just using conda as package installer. When it came to pip they just ignored this aspect.


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: