quantum icon indicating copy to clipboard operation
quantum copied to clipboard

ubuntu 22.04: Could not find a version that satisfies the requirement tensorflow-quantum

Open cjhudlin opened this issue 2 years ago • 14 comments

hello, we are tying to install T-quantum on a server at our location, tensrflow 2.13 is installed and all other requirements installed via conda. python3 version installed is 3.11. when running the command "pip install -U tensorflow-quantum" as per the install instrutions, the error comes:

pip3 install -U tensorflow-quantum --verbose Using pip 23.2.1 from /home/uadmin/miniconda3/lib/python3.11/site-packages/pip (python 3.11) ERROR: Could not find a version that satisfies the requirement tensorflow-quantum (from versions: none) ERROR: No matching distribution found for tensorflow-quantum

please can someone assist here?

thank you

cjhudlin avatar Aug 08 '23 14:08 cjhudlin

Neither TF 2.13 nor Python 3.11 is supported. See https://github.com/tensorflow/quantum/issues/794#issuecomment-1635037043.

lockwo avatar Aug 08 '23 14:08 lockwo

why is the latest version not supported?

cjhudlin avatar Aug 08 '23 14:08 cjhudlin

I don't know. I would guess because TFQ doesn't have a lot of development support, and the latest version doesn't have a huge set of feature improvements relevant for TFQ.

lockwo avatar Aug 08 '23 14:08 lockwo

thank you for the heads up, ill install with recommended tf, tfq and python versions

cjhudlin avatar Aug 08 '23 16:08 cjhudlin

now it is working, but this install instructions need to be updated on the website as the install instructions referr to installing tf2.13:

install tensorflow: curl https://repo.anaconda.com/miniconda/Miniconda3-py39_23.5.2-0-Linux-x86_64.sh -o Miniconda3-py39_23.5.2-0-Linux-x86_64.sh bash Miniconda3-py39_23.5.2-0-Linux-x86_64.sh

conda create --name tf python=3.9 conda activate tf conda install -c conda-forge cudatoolkit=11.8.0

pip install nvidia-cudnn-cu11==8.6.0.163

mkdir -p $CONDA_PREFIX/etc/conda/activate.d echo 'CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.file)"))' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh echo 'export LD_LIBRARY_PATH=$CONDA_PREFIX/lib/:$CUDNN_PATH/lib:$LD_LIBRARY_PATH' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh

pip install tensorflow==2.11.* pip3 install -U tensorflow-quantum

cjhudlin avatar Aug 08 '23 18:08 cjhudlin

Where is 2.13 on the website? I see the install website saying python 3.7, 3.8, 3.9 are supported, and 2.11 TF (which isn't even really right, 2.7 is required for the stable versions of TF), but I don't see 2.13 on https://www.tensorflow.org/quantum/install

lockwo avatar Aug 08 '23 18:08 lockwo

image

also, even after meeting the requirements, still cannot install tfq. i have installed tf 2.11 and use python 3.10 which is suppported by tf 2.11, but usng pip or conda it doesn find tensorflow-quantum or tfq-nightly packages

cjhudlin avatar Aug 09 '23 07:08 cjhudlin

edit: i was able to install TFQ wth the command above. i had to remove it and reinstall lika above. the command was modified

cjhudlin avatar Aug 09 '23 08:08 cjhudlin

Could you explain what commands you used to remove and reinstall? I do not see the commands you are referring to. Thanks in advance.

kiannaamaya avatar Sep 19 '23 19:09 kiannaamaya

If you installed via pip it's pip uninstall and pip install. However, you want to make sure to remove all potentially conflicting TF stuff which can be a pain. I recommend using a new virtual environment and just doing a clean install.

lockwo avatar Sep 19 '23 19:09 lockwo

Thank you for your response but I have still been able to try a solution. I tried no Mac and Windows and nothing has worked so far.

kiannaamaya avatar Sep 19 '23 23:09 kiannaamaya

You tried with Mac and windows? Windows is unsupported (past like v0.2 or something), and if the Mac is M1 or M2 there are a lot of issues (with TF more broadly, see other issues on this GitHub specific to Mac). If you are having more general troubles, distinct from previous open or closed issues, I suggest you open a new issue with all of you hardware/software details, what steps you took, what the errors are, etc.

lockwo avatar Sep 20 '23 00:09 lockwo

Duplicate of #798

knottyanyon avatar Sep 22 '23 13:09 knottyanyon

Try opening google.com and then run this command. This solution worked for me. I was trying to run this on my corporate laptop but to no avail until i tried the above fix as recommended by my IT department

BytePaul avatar Jan 25 '24 09:01 BytePaul