Closed jsheunis closed 1 year ago
I am afraid that not entire mystery revealed since in the top you have
> python -m pip install datalad-container
Requirement already satisfied: datalad-container in /Users/jsheunis/my_env/lib/python3.9/site-packages (1.2.3)
so -- datalad-container was already installed somehow, although you have not posted output from the pip install datalad
above... may be that ~/my_env
existed already before you started and installation was somehow 'crippled', and then subsequent commands didn't resolve it. Try again from scratch ensuring that folder doesn't exist before, and post full output.
Sorry for delaying this:
> python -m venv ~/my_totally_unique_env_yeah
> source ~/my_totally_unique_env_yeah/bin/activate
> python -m pip install datalad
Collecting datalad
Using cached datalad-0.19.3-py3-none-any.whl (1.3 MB)
Collecting iso8601
Using cached iso8601-2.1.0-py3-none-any.whl (7.5 kB)
Collecting annexremote
Downloading annexremote-1.6.4-py3-none-any.whl (25 kB)
Collecting tqdm>=4.32.0
Using cached tqdm-4.66.1-py3-none-any.whl (78 kB)
Collecting distro; python_version >= "3.8"
Using cached distro-1.8.0-py3-none-any.whl (20 kB)
Collecting requests>=1.2
Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Collecting looseversion
Using cached looseversion-1.3.0-py2.py3-none-any.whl (8.2 kB)
Collecting packaging
Using cached packaging-23.2-py3-none-any.whl (53 kB)
Collecting python-gitlab
Downloading python_gitlab-4.1.1-py3-none-any.whl (137 kB)
|████████████████████████████████| 137 kB 4.2 MB/s
Collecting fasteners>=0.14
Using cached fasteners-0.19-py3-none-any.whl (18 kB)
Collecting boto
Using cached boto-2.49.0-py2.py3-none-any.whl (1.4 MB)
Collecting keyring!=23.9.0,>=20.0
Using cached keyring-24.2.0-py3-none-any.whl (37 kB)
Collecting platformdirs
Using cached platformdirs-3.11.0-py3-none-any.whl (17 kB)
Collecting keyrings.alt
Using cached keyrings.alt-5.0.0-py3-none-any.whl (18 kB)
Collecting patool>=1.7
Downloading patool-1.15.0-py2.py3-none-any.whl (91 kB)
|████████████████████████████████| 91 kB 2.1 MB/s
Collecting typing-extensions>=4.0.0; python_version < "3.11"
Using cached typing_extensions-4.8.0-py3-none-any.whl (31 kB)
Collecting humanize
Using cached humanize-4.8.0-py3-none-any.whl (117 kB)
Collecting chardet>=3.0.4
Using cached chardet-5.2.0-py3-none-any.whl (199 kB)
Collecting importlib-metadata>=3.6; python_version < "3.10"
Using cached importlib_metadata-6.8.0-py3-none-any.whl (22 kB)
Collecting msgpack
Using cached msgpack-1.0.7-cp39-cp39-macosx_10_9_x86_64.whl (234 kB)
Collecting urllib3<3,>=1.21.1
Downloading urllib3-2.0.7-py3-none-any.whl (124 kB)
|████████████████████████████████| 124 kB 8.9 MB/s
Collecting charset-normalizer<4,>=2
Downloading charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_x86_64.whl (122 kB)
|████████████████████████████████| 122 kB 8.2 MB/s
Collecting idna<4,>=2.5
Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2023.7.22-py3-none-any.whl (158 kB)
Collecting requests-toolbelt>=0.10.1
Using cached requests_toolbelt-1.0.0-py2.py3-none-any.whl (54 kB)
Collecting jaraco.classes
Using cached jaraco.classes-3.3.0-py3-none-any.whl (5.9 kB)
Collecting zipp>=0.5
Using cached zipp-3.17.0-py3-none-any.whl (7.4 kB)
Collecting more-itertools
Using cached more_itertools-10.1.0-py3-none-any.whl (55 kB)
Installing collected packages: iso8601, annexremote, tqdm, distro, urllib3, charset-normalizer, idna, certifi, requests, looseversion, packaging, requests-toolbelt, python-gitlab, fasteners, boto, zipp, importlib-metadata, more-itertools, jaraco.classes, keyring, platformdirs, keyrings.alt, patool, typing-extensions, humanize, chardet, msgpack, datalad
Successfully installed annexremote-1.6.4 boto-2.49.0 certifi-2023.7.22 chardet-5.2.0 charset-normalizer-3.3.2 datalad-0.19.3 distro-1.8.0 fasteners-0.19 humanize-4.8.0 idna-3.4 importlib-metadata-6.8.0 iso8601-2.1.0 jaraco.classes-3.3.0 keyring-24.2.0 keyrings.alt-5.0.0 looseversion-1.3.0 more-itertools-10.1.0 msgpack-1.0.7 packaging-23.2 patool-1.15.0 platformdirs-3.11.0 python-gitlab-4.1.1 requests-2.31.0 requests-toolbelt-1.0.0 tqdm-4.66.1 typing-extensions-4.8.0 urllib3-2.0.7 zipp-3.17.0
WARNING: You are using pip version 20.2.3; however, version 23.3.1 is available.
You should consider upgrading via the '/Users/jsheunis/my_totally_unique_env_yeah/bin/python -m pip install --upgrade pip' command.
> python -m pip install datalad-container
Collecting datalad-container
Using cached datalad_container-1.2.3-py3-none-any.whl (38 kB)
Requirement already satisfied: datalad>=0.18.0 in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from datalad-container) (0.19.3)
Requirement already satisfied: requests>=1.2 in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from datalad-container) (2.31.0)
Requirement already satisfied: annexremote in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from datalad>=0.18.0->datalad-container) (1.6.4)
Requirement already satisfied: chardet>=3.0.4 in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from datalad>=0.18.0->datalad-container) (5.2.0)
Requirement already satisfied: humanize in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from datalad>=0.18.0->datalad-container) (4.8.0)
Requirement already satisfied: packaging in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from datalad>=0.18.0->datalad-container) (23.2)
Requirement already satisfied: tqdm>=4.32.0 in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from datalad>=0.18.0->datalad-container) (4.66.1)
Requirement already satisfied: python-gitlab in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from datalad>=0.18.0->datalad-container) (4.1.1)
Requirement already satisfied: typing-extensions>=4.0.0; python_version < "3.11" in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from datalad>=0.18.0->datalad-container) (4.8.0)
Requirement already satisfied: fasteners>=0.14 in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from datalad>=0.18.0->datalad-container) (0.19)
Requirement already satisfied: distro; python_version >= "3.8" in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from datalad>=0.18.0->datalad-container) (1.8.0)
Requirement already satisfied: looseversion in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from datalad>=0.18.0->datalad-container) (1.3.0)
Requirement already satisfied: msgpack in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from datalad>=0.18.0->datalad-container) (1.0.7)
Requirement already satisfied: patool>=1.7 in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from datalad>=0.18.0->datalad-container) (1.15.0)
Requirement already satisfied: platformdirs in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from datalad>=0.18.0->datalad-container) (3.11.0)
Requirement already satisfied: keyring!=23.9.0,>=20.0 in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from datalad>=0.18.0->datalad-container) (24.2.0)
Requirement already satisfied: keyrings.alt in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from datalad>=0.18.0->datalad-container) (5.0.0)
Requirement already satisfied: boto in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from datalad>=0.18.0->datalad-container) (2.49.0)
Requirement already satisfied: iso8601 in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from datalad>=0.18.0->datalad-container) (2.1.0)
Requirement already satisfied: importlib-metadata>=3.6; python_version < "3.10" in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from datalad>=0.18.0->datalad-container) (6.8.0)
Requirement already satisfied: idna<4,>=2.5 in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from requests>=1.2->datalad-container) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from requests>=1.2->datalad-container) (2.0.7)
Requirement already satisfied: certifi>=2017.4.17 in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from requests>=1.2->datalad-container) (2023.7.22)
Requirement already satisfied: charset-normalizer<4,>=2 in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from requests>=1.2->datalad-container) (3.3.2)
Requirement already satisfied: requests-toolbelt>=0.10.1 in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from python-gitlab->datalad>=0.18.0->datalad-container) (1.0.0)
Requirement already satisfied: jaraco.classes in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from keyring!=23.9.0,>=20.0->datalad>=0.18.0->datalad-container) (3.3.0)
Requirement already satisfied: zipp>=0.5 in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from importlib-metadata>=3.6; python_version < "3.10"->datalad>=0.18.0->datalad-container) (3.17.0)
Requirement already satisfied: more-itertools in /Users/jsheunis/my_totally_unique_env_yeah/lib/python3.9/site-packages (from jaraco.classes->keyring!=23.9.0,>=20.0->datalad>=0.18.0->datalad-container) (10.1.0)
Installing collected packages: datalad-container
Successfully installed datalad-container-1.2.3
WARNING: You are using pip version 20.2.3; however, version 23.3.1 is available.
You should consider upgrading via the '/Users/jsheunis/my_totally_unique_env_yeah/bin/python -m pip install --upgrade pip' command.
> datalad containers-run
datalad: Unknown command 'containers-run'. See 'datalad --help'.
Hint: Command containers-run is provided by (not installed) extension datalad-container.
first step of troubleshooting is which datalad
to ensure that it is the one from the venv
and not some globally installed one. In my case, sometimes zsh
manages to use some cached position instead of a "Fresh" one
> which datalad
/Users/jsheunis/my_totally_unique_env_yeah/bin/datalad
python -c 'import datalad_containers'; datalad wtf -S extensions
might be of help
> python -c 'import datalad_containers'; datalad wtf -S extensions
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'datalad_containers'
# WTF
## extensions
- container:
- description: Containerized environments
- entrypoints:
- datalad_container.containers_add.ContainersAdd:
- class: ContainersAdd
- module: datalad_container.containers_add
- names:
- containers-add
- containers_add
- datalad_container.containers_list.ContainersList:
- class: ContainersList
- module: datalad_container.containers_list
- names:
- containers-list
- containers_list
- datalad_container.containers_remove.ContainersRemove:
- class: ContainersRemove
- module: datalad_container.containers_remove
- names:
- containers-remove
- containers_remove
- datalad_container.containers_run.ContainersRun:
- class: ContainersRun
- module: datalad_container.containers_run
- names:
- containers-run
- containers_run
- module: datalad_container
- version: 1.2.3
sorry -- damn naming discrepancy - was looking for datalad_container
module. so -- presumably those commands should be available ;) I guess someone should debug that location where whatever in datalad
discovers/uses them all... here is what I see
❯ datalad -l 1 containers-run
[DEBUG ] Command line args 1st pass for DataLad 0.19.2. Parsed: Namespace() Unparsed: ['containers-run']
[DEBUG ] Processing entrypoints
[DEBUG ] Loading entrypoint deprecated from datalad.extensions
[DEBUG ] Loaded entrypoint deprecated from datalad.extensions
[DEBUG ] Loading entrypoint container from datalad.extensions
[DEBUG ] Loaded entrypoint container from datalad.extensions
[DEBUG ] Loading entrypoint metalad from datalad.extensions
[DEBUG ] Loaded entrypoint metalad from datalad.extensions
[DEBUG ] Done processing entrypoints
[Level 5] Importing module datalad_container.containers_run
...
do you see loading entry point loading for container?
lol i didn't even spot the typo. If I fix the typo, the module is imported without error.
OK, now this is weird:
> datalad containers-run
[ERROR ] No known containers. Use containers-add
I don't know if it could be because I deactivated and reactivated the environment?
who knows... may be your shell at first didn't realize that new datalad
is available, and that which
made it known? do you have another datalad
available? (which -a datalad
should give all in your PATH)
Indeed it looks like it:
> which -a datalad
/Users/jsheunis/my_totally_unique_env_yeah/bin/datalad
/Users/jsheunis/opt/miniconda3/bin/datalad
so there's some base-level conda installation of datalad?
If I open another shell session and activate a conda environment that has datalad installed (via pip), and then run the same command, I only see the activated environment's datalad installation:
> conda activate ct
> which -a datalad
/Users/jsheunis/opt/miniconda3/envs/ct/bin/datalad
So I guess the venv environment sees the base conda installation of datalad (first), but a conda environment sees only its only installation?
so there's some base-level conda installation of datalad?
only you would know if you did install datalad before in the base
environment there ;)
So I guess the venv environment sees the base conda installation of datalad (first), but a conda environment sees only its only installation?
no. I think it was just a fluke of the shell that it likely used cached path to base installation . Calling hash datalad
should force it to "reconsider". Altogether I do not think there is anything to fix really, in particular in datalad-container, so I will close.
I'm working on a mac with Python 3.9.1 base installation.
I created a fresh virtual environment using
venv
withdatalad
-core anddatalad-container
installed:Subsequently
containers-run
is not recognized:and
datalad wtf
output does not showdatalad-container
as an extension.datalad wtf
``` > datalad wtf # WTF ## configurationHowever, a
datalad rerun
command was run prior to thecontainers-run
execution, and this process internally imported modules fromdatalad-container
without problem.I then created a virtual environment with miniconda:
I then ran the
datalad containers-run -n docker-make main.pdf
command and everything worked nicely. I.e. thecontainers-run
command is recognized inside the conda environment.