export conda environment without prefix variable which shows local path to executable

This question was already addressed here, but without a real explanation on the role of prefix. At least there is a solution to exclude the prefix line programmatically. It is not mentioned in the conda doc, except for the fact that conda env export –prefix PATH allows to specify a prefix. But note that –name … Read more

How can I upgrade Python version and packages in pyenv virtualenv?

Here is how you can switch to 3.9.0 for a given virtual environement venv-name: pip freeze > requirements-lock.txt pyenv virtualenv-delete venv-name pyenv install -s 3.9.0 pyenv virtualenv 3.9.0 venv-name pyenv activate venv-name pip install -r requirements-lock.txt Once everything works correctly you can safely remove the temporary requirements lock file: rm requirements-lock.txt Note that using pip … Read more

Conda list shows a package but cannot import it

A couple possibilities occur to me: 1. A Potential Path Problem Your python command might refer to a different python than the python which is in your active conda environment folder. Check this by running in terminal which conda and which python. If you get something like the below, you’re good here. /anaconda3/bin/conda /anaconda3/envs/<yourEnvName>/bin/python If … Read more

tech