Problem when installing pybox2d with anaconda - python-3.x

I tried to install pybox2d through anaconda navigator with Python 3.7 , but it shows this error, I could not solve
I read all the library documentation!
Error:
(user) user#euser:~$ conda install -c https://conda.anaconda.org/kne pybox2d
Solving environment: failed
UnsatisfiableError: The following specifications were found to be in conflict:
- jeepney
- notebook==5.7.4
- pybox2d
Use "conda info " to see the dependencies for each package.

I had the same problem. My tensorflow and pybox2d where conflicting.
I followed these steps by anuj:
conda create -n stackoverflow_env python=3.7
source activate stackoverflow_env
conda install -c kne pybox2d
and then installed tensorflow from anaconda navigator in this environment.

I created a new conda environment to avoid being influenced by the existing installations and followed the steps given below. After this, Box2D is importing fine for me.
conda create -n stackoverflow_env python=3.7
source activate stackoverflow_env
conda install -c kne pybox2d

Related

Unable to install tensorflow using conda with python 3.8

Recently, I upgraded to Anaconda3 2020.07 which uses python 3.8. In past versions of anaconda, tensorflow was installed successfully. Tensorflow failed to be installed successfully in this version.
I ran the command below;
conda install tensorflow-gpu
The error message that I received is shown below;
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- tensorflow-gpu -> python[version='3.5.*|3.6.*|3.7.*|>=3.7,<3.8.0a0|>=3.6,<3.7.0a0|>=3.5,<3.6.0a0|>=2.7,<2.8.0a0']
Your python: python=3.8
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.
The following specifications were found to be incompatible with your CUDA driver:
- feature:/win-64::__cuda==11.0=0
Your installed CUDA driver is: 11.0
Is there a conda command with the right parameters to get tensorflow installed successfully?
UPDATE:
TF is now compatible with Python 3.8
Tensorflow is not compatible with Python 3.8. See https://www.tensorflow.org/install/pip
You need to downgrade your python version :
conda install python=3.7
Create an environment with python 3.7 and then activate it:
conda create -n p37env python=3.7
conda activate p37env
And install tensorflow.
This worked for me, and found out the answer from the Anaconda user guide (under how to use a different python version: https://conda.io/projects/conda/en/latest/user-guide/getting-started.html#managing-python )
From the requirement page:
Python 3.8 support requires TensorFlow 2.2 or later.
So there is a verison of Tensorflow compatible with python 3.8.
The problem is that TensorFlow 2.2.0 is not available through conda on Windows, this should be the reason why you get PackagesNotFoundError when running
conda install tensorflow=2.2
EDIT 15/03/21
Tensorflow 2.3.0 is compatible with Windows
i think we have two options here
pip install tensorflow
or we can use another env of anaconda such as like this below
conda create -n tf tensorflow pydotplus jupyter
conda activate tf
Actually you can directly use pip inside anaconda prompt, after I tested it, I found the conda is capable with pypi, first run the anaconda prompt with administrator permission (in windows), then enter "conda update --all" to make sure all the packages are latest, finally enter "pip install tensorflow" to install (the new version of tensorflow already includes tensorflow-gpu).
Then using VS code to open an ipynb and run
import tensorflow as tf
tf.test.gpu_device_name()
everything looks good.
For more info please refer to Anaconda official docs: https://docs.anaconda.com/anaconda/ .
Latest development for tensorflow installation on anaconda.
https://anaconda.org/anaconda/tensorflow
https://anaconda.org/anaconda/tensorflow-gpu
9 days ago, Anaconda uploaded a new tensorflow v2.3 package. Anaconda3 2020.07 (uses python v3.8) users can easily upgrade to tensorflow v2.3 with the following commands;
conda install -c anaconda tensorflow
conda install -c anaconda tensorflow-gpu
I have personally tested that the installation worked successfully.
The other answers for this question have now become obsolete.
Expanding upon William's answer here with more explicit instructions and caveats. Pip is the recommended way to install latest version of tensorflow as per tensorflow's installation instructions -- "While the TensorFlow provided pip package is recommended, a community-supported Anaconda package is available."
Here is the code that uses pip to do the installation in a Conda environment:
conda create -n env_name python=3.8
conda activate env_name
conda install pandas scikit-learn matplotlib notebook ##installing usual Data Science packages that does include numpy and scipy
pip install tensorflow
python -c "import tensorflow as tf;print(tf.__version__)" ##checks tf version
In general, we should be careful while mixing two package managers (conda and pip). So, it is suggested that:
Only after conda has been used to install as many packages as possible
should pip be used to install any remaining software. If modifications
are needed to the environment, it is best to create a new environment
rather than running conda after pip.
For an example, if we would like to install seaborn in the just created env_name environment, we should:
conda create --name cloned_env --clone env_name
conda activate cloned_env
conda install seaborn
Once we check the cloned_env environment is working fine, we can delete the env_name environment.
I was running into the same issue in conda prompt for Python 3.8.5 and fixed it using a Python wheel instead. Here are the steps:
Open conda prompt and install pip if you don't have it already: python -m pip install --upgrade pip
python -m pip install --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-2.4.0-cp38-cp38-win_amd64.whl
Note: If you need a CPU specific tensorflow, use this wheel: https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow_cpu-2.4.0-cp38-cp38-win_amd64.whl
I just downgraded python to 3.7 as tf is not avialable to 3.8 version also I cannot use virtualenv for code that's why
The only working answer for me is:
conda install -c conda-forge tensorflow
It appears that tensorflow 2.5 on GPU has issues with spyder. So, I made new environment and installed tensorflow gpu as suggested by anaconda. Now I have to use either prompt or jupyter . At least it works
For macos users I suggest create an environment with python 3.7 and install tensorflow there.
You can run these commands too:
conda create -n new_env_name python=3.7
conda activate new_env_name
I had a similar problem in Anaconda Spyder. Here was my solution (In the Anaconda Console):
conda install pip
pip install tensorflow ==2.2.0

How to install opencv in anaconda on windows

I want to install opencv in anaconda on windows and I tried bunch of ways but I could not install it my last attempt is :
conda install -c https://conda.binstar.org/menpo opencv
and i get :
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed
Note: you may need to restart the kernel to use updated packages.
and after that :
WARNING conda.base.context:use_only_tar_bz2(632): Conda is constrained to only using the old .tar.bz2 file format because you have conda-build installed, and it is <3.18.3. Update or remove conda-build to get smaller downloads and faster extractions.
UnsatisfiableError: The following specifications were found to be incompatible with each other:
anaconda==2019.03=py37_0 -> h5py==2.9.0=py37h5e291fa_0 -> hdf5[version='>=1.10.4,<1.10.5.0a0']
anaconda==2019.03=py37_0 -> importlib_metadata==0.8=py37_0 -> zipp[version='>=0.3.2']
h5py -> hdf5[version='>=1.10.4,<1.10.5.0a0']
hdf5
pkgs/main/win-64::importlib_metadata==0.8=py37_0 -> zipp[version='>=0.3.2']
pkgs/main/win-64::path.py==11.5.0=py37_0 -> importlib_metadata[version='>=0.5']
pkgs/main/win-64::zipp==0.3.3=py37_1
pytables -> hdf5[version='>=1.10.4,<1.10.5.0a0']
We had the same issue described in the other answer with 3.7, however the command that worked is conda create --name py3 python=3.6 following by activate py3 and it should work for you.
We also faced similar issue when installed Anaconda with python 3.7 .
the following steps solved our problem .
Created a new virtual environment with python 3.6
conda create -n new_env python=3.6
activate that environment
conda activate new_env
and then install opencv 3
conda install -c menpo opencv=3
I think it is better to follow these steps :
Open Anaconda Prompt and type following command :
conda create -n tensorflow_cpu pip python=3.6
After creating a new environment try this command line :
activate tensorflow_cpu
Then you can start installing the Tensorflow library by this command :
pip install --ignore-installed --upgrade tensorflow==1.9
After finishing installation close the prompt and reopen it .
Type python in prompt and trying command import tensorflow as tf
if you're directing to prompt without Error "well done "
what worked for me is :
pip install opencv-contrib-python

i tried installing tensorflow using 'pip install tensorflow ' in anaconda prompt and command prompt. its showing following output

Found existing installation: wrapt 1.10.11
Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
Try the below commands mentioned, it worked for me
conda update wrapt
pip install tensorflow
(1) First try to install wrapt manually using following command
pip install wrapt --upgrade --ignore-installed
make sure that you use "--ignore-installed" flag when install 'wrapt' as above mentioned command
(2) Then install tensorflow with pip
eg:
pip install tensorflow==1.14
this should work
You might want to upgrade numpy with following incase its not compatible otherwise it will throw errors.
pip install numpy --upgrade
I was getting this error while installing from conda environment. Always upgrade conda or pip before a new installation.
Following worked for me:
[Optional] If installing in conda environment, then temporarily remove the conda env:
conda remove --name myenv --all
Update all conda packages:
conda update --all
Create conda env again:
conda create -n myenv
Activate conda env:
conda activate
Install tensorflow:
pip install tensorflow

Installing pygame for python3 in mac using anaconda

I am trying to install pygame for python 3 and get the error:
conda install -c cogsci pygame
Solving environment: failed
UnsatisfiableError: The following specifications were found to be in
conflict:
- pygame
- xlwt
Use "conda info <package>" to see the dependencies for each package.
Tried to install xlwt again but nothing change :
conda install xlwt
Solving environment:
done
All requested packages already installed.
Any idea how to install it?
Thanks
The UnsatisfiableError means that the two packages listed cannot be installed in the same environment. You need to create a new environment to install pygame:
conda create -n pygameenv -c cogsci pygame

Pytorch installation problems with Anaconda

After having upgraded my environment's python to Python 3.61, I attempted to install pytorch using this command:
conda install -c peterjc123 pytorch
However I got this error:
Fetching package metadata .............
Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
-pytorch
-pyqt
I also used the commands
conda install -c peterjc123 pytorch cuda90
conda install -c peterjc123 pytorch cuda80
But the result is still the same. Anyone got a clue how to solve this?
The problem was solved after downgrading from Python 3.6.2 to Python 3.5.1 after running:
conda install -c anaconda python=3.5.1
After running this command, run:
conda install -c peterjc123 pytorch
Pytorch should install as per normal. A similar issue occurs for openCV as well
An alternative way to install pytorch using anaconda is
conda create -n py_env python=3.5
source activate py_env
conda install pytorch-cpu torchvision -c pytorch
Go to python shell and import using the command
import torch
Hope this helps.

Resources