1
$\begingroup$

I created a conda environment previously and it worked fine with python and tensorflow. At that stage I used anaconda.

On a fresh install I am using miniconda since I now understand the conda commands better. After installing python, packages like numpy and scipy (nothing exotic) and tensorflow I can run my previous simple neural network code. The package versions are all listed as compatible on the tensorflow site.

I also installed pillow from conda. It is visible using conda list, but python returns "No module named 'pillow'". My code to preprocess images no longer works so I need to fix this. So I'm trying to create a new environment to work in.

When I try to install python 3.8.0 in the new environment I get "An unexpected error has occurred. Conda has prepared the above report."

conda install python==3.8.0

> An unexpected error has occurred. Conda has prepared the above report.
> 
> If submitted, this report will be used by core maintainers to improve
> future releases of conda. Would you like conda to send this report to
> the core maintainers? [y/N]: y Upload successful.

Should I purge conda and start from scratch?

$\endgroup$

2 Answers 2

1
$\begingroup$

Its a bit drastic. Could you try ...

conda update --strict-channel-priority --all
conda update --all
conda update anaconda # this could be removed 'cause you're using miniconda
conda update conda 

conda activate myenv
conda install python=3.8.0

I always thought a single = was used. If that fails I'd delete the environment and create a new one

conda remove -n myenv --all
conda create -n newenv python=3.8
conda activate newenv
$\endgroup$
1
  • $\begingroup$ Thanks, this didn't fix the problem so I'm removing miniconda, installing again and following the process that worked for me previously: 1. Create conda environment 2. Install NVIDIA cudatools, cuDNN and tensorflow with conda 3. Install python 3.8.0 with conda (the "=" or "==" doesn't seem to matter) 4. Install all further packages with pip $\endgroup$ May 15, 2023 at 8:34
1
$\begingroup$

I fixed the problem as indicated in my comment above. I installed python 3.8.0 as part of creating the environment, as it is required for installing tensorflow.

Not directly related to the original question, but a few wrinkles that could help others:

  1. Using conda gave me errors about unresolvable issues several times eg installing tensorflow. Using the option "--experimental-solver=libmamba" with conda solved these issues.
  2. "conda search" only returned version 1.2.0 of tensorflow-datasets. I need 4.6.0 and had to use pip.

Further issues with tensorflow specific to the developer certificate installation requirements:

  1. Uninstalled (using conda again)and reinstalled tensorflow from pip to overcome it not registering my physical graphics card.
  2. Rolled back tensorflow from 2.10.0 to 2.9.0 using pip because of incompatibility of 2.10.0 with installed numpy version.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.