Puzzling behavior installing packages

Hi -

I have puzzling behavior installing packages to run in an Anaconda Navigator 2.4.3 notebook. Hopefully, this is the result of an easily corrected newbie error.

To all appearances I have the keras, tensorflow, mediapipe, pyarrow packages installed & accessible in the proper location (c:\users\ahand.conda\envs\aha-env-py38\lib\site-packages). I’ve tried creating fresh environments a number of times & see the following behavior with one of the packages the 4 packages (seemingly random: sometime tensorflow, sometimes, pyarrow, etc) The below shows the results for pyarrow. The problem is the notebook import fails with:

  • cell-> import pyarrow as pa
    • ModuleNotFoundError: No module named ‘pyarrow’

The core question is: what is the difference between “!conda list” an “conda list” executed in a notebook cell? The “!” command shows the package. The “conda list” (less “!”) doesn’t include the package. What’s the difference & how do I install these packages reliably?

Details below. Suggestions & insights are most welcome!

Here’s a high level summary with version details:

  • created a new environment “aha-env-py38” with Python 3.8.18
  • installed keras 2.4.3 which pulls in
    • keras-applications 1.0.8
    • keras-base 2.4.2
    • kera-preprocessing 1.1.2
  • installed tensorflow 2.3.0 which pulls in
    • tensorboard 2.10.0
    • tensorboard-data-server 0.6.1
    • tensorboard-plugin-wit 1.8.1
    • tensorflow-base 2.3.0
    • tensorflow-estimator 2.6.0
  • installed pyarrow 11.0.0
  • launched “open Terminal”
    • confirmed install packages
  • launched jupyter notebook with “jupyter notebook”
  • launched New->Python 3 notebook
  • cell-> !conda list
    • shows all expected packages
  • cell->: conda list (no shell exclamation)
    • does NOT show “pyarrow”
  • cell-> import pyarrow as pa
    • ModuleNotFoundError: No module named ‘pyarrow’
  • cell-> !pip install pyarrow
    • shows Requirement already satisfied: pyarrow in c:\users\ahand.conda\envs\aha-env-py38\lib\site-packages (11.0.0)
  • cell-> !pip show pyarrow
    • shows
      • Name: pyarrow
      • Version: 11.0.0
      • Summary: Python library for Apache Arrow
      • Home-page: https://arrow.apache.org/
      • Author:
      • Author-email:
      • License: Apache License, Version 2.0
      • Location: c:\users\ahand.conda\envs\aha-env-py38\lib\site-packages
      • Requires: numpy
  • directory list of c:\users\ahand.conda\envs\aha-env-py38\lib\site-packages shows pyarrow

C:\ProgramData\anaconda3\Lib\site-packages - no pyarrow package exists here

C:\Users\ahand.conda\pkgs - pyarrow package exists here:

Hi (again) -

Worked through this issue by:

  • launch Anaconda Prompt as Administrator (avoid Anaconda Desktop)
    • pip install tensorflow

    • pip install keras

    • pip install pyarrow

    • pip install mediapipe

    • jupyter notebook

All imports succeed.

However, uploading an existing notebook (the one I’d like to run) results in being unable to edit the uploaded notebook although I can run it.

Ideas?