Installation error: TensorFlow dependency
See original GitHub issueI successfully downloaded TensorFlow and TensorFlow probability on M1 12.0 macOS into a Conda environment. When pip installing ufcausalimpact into the environment I get the following error. Note: I can successfully import TensorFlow within the Conda environment’s python. I installed TensorFlow following these instructions. I installed python 3.8.10 using pyenv.
Collecting tfcausalimpact
Using cached tfcausalimpact-0.0.9.tar.gz (34 kB)
Preparing metadata (setup.py) ... done
Collecting jinja2
Downloading Jinja2-3.0.3-py3-none-any.whl (133 kB)
|████████████████████████████████| 133 kB 2.6 MB/s
Collecting pandas
Downloading pandas-1.3.5.tar.gz (4.7 MB)
|████████████████████████████████| 4.7 MB 6.7 MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting tfcausalimpact
Using cached tfcausalimpact-0.0.8.tar.gz (34 kB)
Preparing metadata (setup.py) ... done
Using cached tfcausalimpact-0.0.6.tar.gz (33 kB)
Preparing metadata (setup.py) ... done
Downloading tfcausalimpact-0.0.5.tar.gz (33 kB)
Preparing metadata (setup.py) ... done
Downloading tfcausalimpact-0.0.4.tar.gz (34 kB)
Preparing metadata (setup.py) ... done
Downloading tfcausalimpact-0.0.3.tar.gz (33 kB)
Preparing metadata (setup.py) ... done
Downloading tfcausalimpact-0.0.2.tar.gz (33 kB)
Preparing metadata (setup.py) ... done
Downloading tfcausalimpact-0.0.1.tar.gz (33 kB)
Preparing metadata (setup.py) ... done
Downloading tfcausalimpact-0.0.0.tar.gz (33 kB)
Preparing metadata (setup.py) ... done
ERROR: Cannot install tfcausalimpact==0.0.0, tfcausalimpact==0.0.1, tfcausalimpact==0.0.2, tfcausalimpact==0.0.3, tfcausalimpact==0.0.4, tfcausalimpact==0.0.5, tfcausalimpact==0.0.6, tfcausalimpact==0.0.8 and tfcausalimpact==0.0.9 because these package versions have conflicting dependencies.
The conflict is caused by:
tfcausalimpact 0.0.9 depends on tensorflow
tfcausalimpact 0.0.8 depends on tensorflow
tfcausalimpact 0.0.6 depends on tensorflow
tfcausalimpact 0.0.5 depends on tensorflow
tfcausalimpact 0.0.4 depends on tensorflow
tfcausalimpact 0.0.3 depends on tensorflow
tfcausalimpact 0.0.2 depends on tensorflow
tfcausalimpact 0.0.1 depends on tensorflow
tfcausalimpact 0.0.0 depends on tensorflow
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Build and install error messages - TensorFlow
The following list links error messages to a solution or discussion. If you find an installation or build problem that is not listed,...
Read more >Tensorflow installation problems in Windows - Stack Overflow
The problem is most likely due a conflict with your two Python installations, as TensorFlow on Windows is only compatible with Python 3.5...
Read more >Tensorflow - h5py dependency error @ mamba install #951
I will look into this issue; please take that tensorflow-base back out of your environment.yml file. Try pinning tensorflow 2.4; that may solve ......
Read more >install_tensorflow - TensorFlow for R - RStudio
install_tensorflow() installs just the tensorflow python package and it's direct dependencies. For a more complete installation that includes additional ...
Read more >I can't install TensorFlow-macos a… | Apple Developer Forums
ERROR: Cannot install tensorflow-macos==2.5.0 and tensorflow-macos==2.6.0 because these package versions have conflicting dependencies. Posted 1 year ago by.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey everyone,
I also installed Tensorflow following the same instructions @GarretOConnell did on my M1 Mac and received the exact same error message. I could resolve this error message by simply doing
conda install python=3.8
&conda install tensorflow
. The default Python version installed in the conda environment is 3.9, which is not compatible with tfcausalimpact and the name of the tensforflow package installed by the Apple developer Guide is ‘tensorflow-macos’, but I guess tfcausalimpact expects it to be called just ‘tensorflow’.After I ran
pip install tfcausalimpact
again, the output said the following:INFO: pip is looking at multiple versions of matplotlib to determine which version is compatible with other requirements. This could take a while.
Pip then downloaded all versions back until 1.3.1, which seems to not be compatible with Python3. The install command then throws an error, because it is not possible to install matplotlib 1.3.1 on Python3 in order to find the compatible version for tfcausalimpact.To bypass this error I set a specific version of matplotlib for the installation:
pip install tfcausalimpact "matplotlib == 3.5.1"
. The installation took some time, but it worked out in the end.To test, if everything works as expected, I copied the example code given in the readme of this repository and received and error saying that I could not import pandas, due to some numpy array issues between C and Py0bject. Unfortunately, I did not copy this error and am not able to reproduce to give you the exact error message I’ve received. I resolved this issue by doing
pip install --upgrade numpy
. Afterwards I received the expected result of the readme example. However, I received the following warnings:WARNING:tensorflow:@custom_gradient grad_fn has 'variables' in signature, but no ResourceVariables were used on the forward pass. WARNING:tensorflow:@custom_gradient grad_fn has 'variables' in signature, but no ResourceVariables were used on the forward pass. WARNING:tensorflow:@custom_gradient grad_fn has 'variables' in signature, but no ResourceVariables were used on the forward pass. WARNING:tensorflow:@custom_gradient grad_fn has 'variables' in signature, but no ResourceVariables were used on the forward pass. WARNING:tensorflow:From /Users/brummue/miniforge3/lib/python3.8/site-packages/tensorflow/python/autograph/impl/api.py:463: StructuralTimeSeries.joint_log_prob (from tensorflow_probability.python.sts.structural_time_series) is deprecated and will be removed after 2022-03-01. Instructions for updating: Please use 'StructuralTimeSeries.joint_distribution(observed_time_series).log_prob' WARNING:tensorflow:@custom_gradient grad_fn has 'variables' in signature, but no ResourceVariables were used on the forward pass. WARNING:tensorflow:@custom_gradient grad_fn has 'variables' in signature, but no ResourceVariables were used on the forward pass. WARNING:tensorflow:@custom_gradient grad_fn has 'variables' in signature, but no ResourceVariables were used on the forward pass. WARNING:tensorflow:@custom_gradient grad_fn has 'variables' in signature, but no ResourceVariables were used on the forward pass. WARNING:tensorflow:@custom_gradient grad_fn has 'variables' in signature, but no ResourceVariables were used on the forward pass. WARNING:tensorflow:@custom_gradient grad_fn has 'variables' in signature, but no ResourceVariables were used on the forward pass. WARNING:tensorflow:@custom_gradient grad_fn has 'variables' in signature, but no ResourceVariables were used on the forward pass. WARNING:tensorflow:@custom_gradient grad_fn has 'variables' in signature, but no ResourceVariables were used on the forward pass. WARNING:tensorflow:From /Users/brummue/miniforge3/lib/python3.8/site-packages/tensorflow_probability/python/distributions/distribution.py:345: calling MultivariateNormalDiag.__init__ (from tensorflow_probability.python.distributions.mvn_diag) with scale_identity_multiplier is deprecated and will be removed after 2020-01-01. Instructions for updating: 'scale_identity_multiplier' is deprecated; please combine it into 'scale_diag' directly instead. WARNING:tensorflow:From /Users/brummue/miniforge3/lib/python3.8/site-packages/tensorflow/python/ops/linalg/linear_operator_block_diag.py:238: LinearOperator.graph_parents (from tensorflow.python.ops.linalg.linear_operator) is deprecated and will be removed in a future version. Instructions for updating: Do not call 'graph_parents'. WARNING:tensorflow:@custom_gradient grad_fn has 'variables' in signature, but no ResourceVariables were used on the forward pass. WARNING:tensorflow:@custom_gradient grad_fn has 'variables' in signature, but no ResourceVariables were used on the forward pass. WARNING:tensorflow:@custom_gradient grad_fn has 'variables' in signature, but no ResourceVariables were used on the forward pass. WARNING:tensorflow:@custom_gradient grad_fn has 'variables' in signature, but no ResourceVariables were used on the forward pass.
2022-04-25 10:27:29.798853: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:185] None of the MLIR Optimization Passes are enabled (registered 2) 2022-04-25 10:27:29.932154: W tensorflow/core/platform/profile_utils/cpu_utils.cc:128] Failed to get CPU frequency: 0 Hz
WARNING:tensorflow:From /Users/brummue/miniforge3/lib/python3.8/site-packages/causalimpact/model.py:408: calling one_step_predictive (from tensorflow_probability.python.sts.forecast) with timesteps_are_event_shape=True is deprecated and will be removed after 2021-12-31. Instructions for updating: 'Predictive distributions returned by 'tfp.sts.one_step_predictive' will soon compute per-timestep probabilities (treating timesteps as part of the batch shape) instead of a single probability for an entire series (the current approach, in which timesteps are treated as event shape). Please update your code to pass 'timesteps_are_event_shape=False' (this will soon be the default) and to explicitly sum over the per-timestep log probabilities if this is required. WARNING:tensorflow:From /Users/brummue/miniforge3/lib/python3.8/site-packages/tensorflow_probability/python/distributions/distribution.py:345: MultivariateNormalFullCovariance.__init__ (from tensorflow_probability.python.distributions.mvn_full_covariance) is deprecated and will be removed after 2019-12-01. Instructions for updating: 'MultivariateNormalFullCovariance' is deprecated, use 'MultivariateNormalTriL(loc=loc, scale_tril=tf.linalg.cholesky(covariance_matrix))' instead.
My question to you @WillianFuks is, if those warnings are okay, I successfully installed tfcausalimpact and therefore could resolve this issue?
Thanks in advance!
Hi, @WillianFuks What linux version should I use? When I use Ubuntu 20.04.2, I got error like this: ERROR: Could not find a version that satisfies the requirement tensorflow (from tf causalimpact) (from versions: none)