ubuntu 22.04: Could not find a version that satisfies the requirement tensorflow-quantum
cjhudlin opened this issue · 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
Neither TF 2.13 nor Python 3.11 is supported. See #794 (comment).
why is the latest version not supported?
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.
thank you for the heads up, ill install with recommended tf, tfq and python versions
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
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
edit: i was able to install TFQ wth the command above. i had to remove it and reinstall lika above. the command was modified
Could you explain what commands you used to remove and reinstall? I do not see the commands you are referring to. Thanks in advance.
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.
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.
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.
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