Install Pygame with Anaconda - python

I'm trying to install pygame on my Mac and get a ton of errors. I'm not 100% sure what this is telling me, except that it's telling me a lot.
Is it saying that Pygame is only compatible with Python 3.5? Because there was another ticket on StackOverflow (Install pygame with anaconda on mac) that said there was a problem with Python 3.5. I'd be surprised if it was incompatible with 3.7.
And if it's not incompatible, what's the problem? Everything I find seems to be quite Windows-centric with its problems and solutions.
% conda install -c cogsci pygame
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- pygame -> python[version='2.7.*|3.5.*']
Your python: python=3.7
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.

You should use pip install pygame instead. The pygame package hosted by cogsci hasn't been updated in close to 4 years. That's the reason it still only supports python 2.7 and 3.5

On OS X with Anaconda I got pygame to work in a terminal with:
conda activate
pip install pygame

Related

My computer refuses to install OpenCV in Anaconda

After re-installing Anaconda 4 times in a row, and trying every possible trick in the book, I cannot seem to get OpenCV in my Anaconda apps. I want to use cv2 in Spyder (version 5.2.2), but countless tries have not resulted in anything of use.
DISCLAIMER: I am quite the noob when it comes to data environments, paths and whatnot, so be nice :)
INFO ABOUT THE PROBLEM:
I have now factory reset the computer, only downloaded and installed Anaconda through the official website. I then tried to type in to the Anaconda prompt:
conda install -c conda-forge opencv
When I run that, it currently produces:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next
repodata source. Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: /
I tried the same yesterday, with similar results. Running for a couple of hours, it started Examining conflicts with a bunch of packages.
At this point I can do no better than just ask here. I've tried so many different ways of trying to install openCV, and none of them have worked. I am desperate for any help.
I am using a GP66 Leopard computer with Windows 10, I don't know what more specs are needed.
In advance, thank you for looking in to this problem.
This did it: pip install opencv-python. Thank you to #CristophRackwitz for the suggestion!

I need a solution to the problem "- dlib -> python[version='2.7.*|3.4.*|3.5.*']"

(base) C:\Users\Lenovo>conda install -c menpo dlib
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.|
failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- dlib -> python[version='2.7.*|3.4.*|3.5.*']
Your python: python=3.7
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.
I did not find a solution to this problem yet. Heeeelppp, i tried both creating a new virtualenv into which install an older version of python (ex 3.5) and run the command pip install quast, but it doesn't work.
I wanna use some libraries such as DLIB, opencv, tensorflow and tesseract for computer vision...

After solving enviroment with conda, unable to install mayavi

I have ran into some issue in trying to install mayavi using conda. First it was stuck in the "solving enviroment" step and afterwards I obtained this
(base) usr#pc:~$ conda install -c anaconda mayavi
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: /
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- mayavi -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.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.
I'm a little bit puzzled by this message, what does it mean "If python is on the left-most side of the chain"? I also modified my PATH and I am using python 3.8, shouldn't the installation work with the most recent version?
It looks like these packages on anaconda channel has not been updated in over a year, but the conda-forge channel has some newer builds, including some for Python 3.8. You could try
conda install -c anaconda -c conda-forge mayavi
(edited with correct conda-forge link)

Not able to create conda environment MacOS

I'm currently struggling with setting up an conda environment on my macOS Big Sur.
I have no clue how to fix it. Google couldn't help me...
The problem:
python 3.9.4 is installed
newest anaconda version is installed
% conda create -n markenv python=3.9.4 anaconda
occurs the following error line:
base) macmarkus#Markuss-MacBook-Pro ~ % conda create -n markenv python=3.9.4 anaconda Collecting package metadata (current_repodata.json): done Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): done Solving environment: | Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versions
Package python conflicts for: anaconda -> python[version='2.7.13|2.7.14|2.7.14|2.7.15|2.7.15|2.7.16|2.7.16|3.6.10|3.6.10|3.7.7|3.7.9|3.8.5|3.8.3|3.8.1|3.7.6|3.6.9|3.7.4|3.6.8|3.7.3|3.6.7|3.7.1|3.7.0|3.6.6|3.6.5|3.5.5|3.6.4|3.5.4|3.6.3|3.5.4|3.6.2|3.5.4|>=3.8,<3.9.0a0|>=3.7,<3.8.0a0|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.5,<3.6.0a0',build='h26d10c0_12|he768d2d_19|hb8880cc_19|hde5916a_29|h0a44026_3|hc167b69_0|h138c1fe_0|h8f8e585_6|h359304d_0|h97142e2_0|haf84260_0|h359304d_0|h359304d_0|hf48f09d_4|h26836e1_0|h26836e1_1|hf48f09d_2|h26836e1_2|h359304d_1|h359304d_2|h97142e2_7|h359304d_1|haf84260_0|haf84260_7|hc167b69_0|hc167b69_1|hc167b69_1|he720263_23|h6804ab2_0|h32f5f24_13|he1de2d4_12'] python=3.9.4 anaconda -> alabaster==0.7.12=py_0 -> python[version='2.7.*|3.5.*|3.6.*|<4.0|>2.7|>=3.6|>=3.5|>=3|>=3.6,<4.0|>=3.4|>=3.7|>=3,<3.7|3.8.*|3.7.*']
Hopefully someone can help me with fixing that!
Thanks a lot :) (its zsh)

OpenCV incompatibility issues

I'm trying to install the opencv package via conda install opencv and get the message
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- opencv -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.7,<3.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.
How can I solve that issues so I can use the package?
All the best.
try:
conda update anaconda-navigator
conda update navigator-updater
conda install opencv-python

Categories