Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cjhudlin opened this issue Aug 8, 2023 · 14 comments

Comments

@cjhudlin
Copy link

cjhudlin commented Aug 8, 2023

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

@lockwo
Copy link
Contributor

lockwo commented Aug 8, 2023

Neither TF 2.13 nor Python 3.11 is supported. See #794 (comment).

@cjhudlin
Copy link
Author

cjhudlin commented Aug 8, 2023

why is the latest version not supported?

@lockwo
Copy link
Contributor

lockwo commented Aug 8, 2023

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.

@cjhudlin
Copy link
Author

cjhudlin commented Aug 8, 2023

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

@cjhudlin
Copy link
Author

cjhudlin commented Aug 8, 2023

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

@lockwo
Copy link
Contributor

lockwo commented Aug 8, 2023

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

@cjhudlin
Copy link
Author

cjhudlin commented Aug 9, 2023

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
Copy link
Author

cjhudlin commented Aug 9, 2023

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

@kiannaamaya
Copy link

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

@lockwo
Copy link
Contributor

lockwo commented Sep 19, 2023

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.

@kiannaamaya
Copy link

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.

@lockwo
Copy link
Contributor

lockwo commented Sep 20, 2023

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.

@knottyanyon
Copy link

Duplicate of #798

@BytePaul
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants