How to interpret conda package conflicts?

Some Practical Advice @Quantum7’s answer gives a fine literal interpretation of Conda’s conflict reporting. However, I wanted to offer a more practical take, which is that this “feature” from Conda is too non-specific to be useful in most non-trivial environments. And sometimes it won’t even include the underlying conflict. Don’t waste your time with it! … Read more

Viewing history of conda transactions?

There is a –revisions, -r flag for this. conda list –revisions Check the conda list –help for more info. If you’d like an exact history, there is a conda-meta/history log in every environment. You could, for example, pull out every command ever executed in an environment, plus a timestamp, using grep -B1 “^# cmd” ${CONDA_PREFIX}/conda-meta/history

Equivalent of `package.json’ and `package-lock.json` for `pip`

There are at least three good options available today: Poetry uses pyproject.toml and poetry.lock files, much in the same way that package.json and lock files work in the JavaScript world. This is now my preferred solution. Pipenv uses Pipfile and Pipfile.lock, also much like you describe the JavaScript files. Both Poetry and Pipenv do more … Read more

Activate conda environment in docker

Followed this tutorial and it worked. Example Dockerfile: FROM continuumio/miniconda WORKDIR /usr/src/app COPY ./ ./ RUN conda env create -f environment.yml # Make RUN commands use the new environment: SHELL [“conda”, “run”, “-n”, “myenv”, “/bin/bash”, “-c”] EXPOSE 5003 # The code to run when container is started: ENTRYPOINT [“conda”, “run”, “-n”, “myenv”, “python3”, “src/server.py”] Update: … Read more

“AssertionError: Torch not compiled with CUDA enabled” in spite upgrading to CUDA version

you dont have to install it via anaconda, you could install cuda from their website. after install ends open a new terminal and check your cuda version with: >>> nvcc –version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2021 NVIDIA Corporation Built on Thu_Nov_18_09:52:33_Pacific_Standard_Time_2021 Cuda compilation tools, release 11.5, V11.5.119 Build cuda_11.5.r11.5/compiler.30672275_0 my is … Read more

Conda set LD_LIBRARY_PATH for env only [duplicate]

You can set environment variables when an environment is activated by editing the activate.d/env_vars.sh script. See here: https://conda.io/docs/user-guide/tasks/manage-environments.html#macos-and-linux The key portions from that link are: Locate the directory for the conda environment in your Terminal window, such as /home/jsmith/anaconda3/envs/analytics. Enter that directory and create these subdirectories and files: cd /home/jsmith/anaconda3/envs/analytics mkdir -p ./etc/conda/activate.d mkdir -p … Read more

How to specify version ranges in Conda environment.yml

I think/assume that the syntax specifying versions is the one documented at Package match specifications. So you would write – numpy >=1.2.3,<1.3 (space after numpy, no space after the comma – not tested). BTW, I couldn’t find any documentation describing the structure of the environment file environment.yml. creating-an-environment-from-an-environment-yml-file refers to Creating an environment file manually … Read more

Install Tensorflow 2.0 in conda enviroment

TENSORFLOW 2.0 release version is out! Since 01/10/2019 I’m not talking beta but the release version. Using Anaconda Since 01/11/2019 Anaconda is supporting the Tensorflow 2.0.0. Option 1: For what the easiest way is just: conda install tensorflow or conda install tensorflow-gpu For the gpu mode, anaconda will take care of all the CUDA everything … Read more