Pyevolve with Anaconda - installation

I am using the Anaconda python distribution for 64 bit, windows
https://store.continuum.io/cshop/anaconda/
I am now trying to do some genetic search, and tried to install Pyevolve
http://pyevolve.sourceforge.net/
Unfortunately it crapped out saying
"Python 2.6 not found in registry"
I do have Python 2.7.6 through Anaconda. Any way around the issue? Thanks.

I managed it using binstar:
Look for available packages: binstar search -t conda pyevolve (two packages found OpenMDAO/pyevolve and greole/pyevolve)
Ask for details of chosen package: binstar show openmdao/pyevolve (install link given)
Install package: conda install --channel https://conda.anaconda.org/OpenMDAO pyevolve
Enjoy working with pyevolve!
My system: Win8, 64-bit, Python 2.7.8, Anaconda 2.1.0 (32-bit).

Anaconda suggests using "conda" for package management. There are some package not available in its repository. You can try command below:
conda search Pyevolve
Pyevolve seems depend on Python 2.6, you can try conda to setup a new environment in 2.6 version.

Related

Installing networkx v2.4 for python3.7 via anaconda on Windows 10

I installed Anaconda3 (version 2019.10-Windowsx86_64) on my PC last week. It comes with networkx v2.3, but I would like to upgrade to v2.4, which should be available on Anaconda according to conda search and Anaconda's website.
I first tried the Anaconda navigator, but can't get it to work. It indicates that networkx can be updated. However, when I click Apply the navigator spends a bit of time "solving package specifications" and then gives me the empty pop-up shown below.
I also tried using conda prompt. Using conda install networkx, conda update networkx, conda install -c anaconda networkx does not result in v2.4 being installed. I also tried conda install networkx=2.4, which takes forever and then reports a very long list of package conflicts. I find this confusing because I just installed Anaconda and haven't tampered with any configs yet.
Grateful for any help on understanding what is going on and how I can attempt to fix it!
I also tried conda install networkx=2.4, which takes forever and then reports a very long list of package conflicts.
This is the key here. anaconda comes with many packages pre-installed and some of these might depend on networkx==2.3 since they might not be compatible with the newest version.
What you can do is create a new environment that has the required version of networkx:
conda create -n myenv python=<your desired python version> networkx==2.4
which will create a new environment where you can only install the packages that you need and make sure that networkx==0.24 is satisfied.
You can try this in jupyter notebook in case you are working on jupyter notebook.
!pip install networkx==2.4
I had 2.5 v installed. But something wasn't working and had to degrade it to 2.4 and above method worked.
Try this:
pip install --upgrade networkx

Unable to open h2o in anaconda

after following the instruction in http://docs.h2o.ai/h2o/latest-stable/h2o-docs/downloading.html#install-in-python, I was able to install h2o v 3.16.0.2. I was also able to use command line instructions mentioned in the above website and test that it is working.
python
import h2o
h2o.init()
h2o.demo("glm")
However, when I launch anaconda spyder, I am not able to import h2o. How do I link the h2o I have installed and bring it into Spyder python?
Update:
I have already tried {conda install -c anaconda h2o } which is mentioned on Anaconda.org, but that installs older ver 3.10 of h2o and that did not work either.
thanks for your help.
I believe the problem is due to your python environment. When you install Anaconda, you need to use anaconda pip, to ensure that the installed packages are available in conda.
The short answer is you can install the lastest stable version of H2O (3.16.0.2 as of today) using conda via h2oai channel instead of anaconda channel (h2o maintains it's own channel):
conda install -c h2oai h2o
this should solve your issue.
But more generally, the packages will appear in conda if you use anaconda pip. You can check which pip is being used by doing
which pip
and making sure that the path to the pip is within your anaconda distribution; something like /home/<userdir>/anaconda/bin/pip instead of /usr/bin/pip
Same is true also for Python. Try checking if starting Python in terminal points to anaconda Python by doing which python. If that's not the case, than you would need to add the conda installation of Python to your PATH variable. Please refer to conda docs for instructions https://conda.io/docs/user-guide/install/index.html
It would have been helpful if you had included information regarding your operating system in the question.

Installing python-igraph for python 3.6 on Windows

I want to install the python-igraph package, but I am currently using python 3.6.1 and I don't find any installer for this new version of python. Do you know how can I install python-igraph for this version?
I have tried to install python-igraph for older versions from anaconda cloud but a version problem occurs.
!conda install -c vtraag python-igraph
Fetching package metadata .............
Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
- python 3.6*
- python-igraph -> python 3.5*
Use "conda info <package>" to see the dependencies for each package.`
I know that python-igraph exists for older python versions, but I don't want to overwrite the current python 3.6 version, so I think I need a new environment to install the older version and be able to use both.
I have already tried to create a new environment for python 3.5:
!conda create -n py35 python=3.5 ipykernel
But after 30min I didn't obtain any response...
I have also followed the same procedure to install a package for python 2.7 (from marufr contributor), but I get the same problem creating an environment for python 2.7.
Note: I am working from Jupyter notebook on Windows (win-64) and using Anaconda.
Update:
Solution found here:
https://medium.com/towards-data-science/environment-management-with-conda-python-2-3-b9961a8a5097
Since there is no python-igraph for python 3.6 yet, I have to use an older version.
First, from Anaconda Prompt, install the nb_conda_kernels package before creating the new environment:
conda install nb_conda_kernels
Then, create the environment where I will work with the older python version:
conda create -n py35 python=3.5 ipykernel
Finally, install the package through the wheel (found here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-igraph)
pip install python_igraph‑0.7.1.post6‑cp35‑none‑win_amd64.whl (You have to this command in the same folder that you donwloaded the wheel!)
There is a Windows installer for igraph‘s Python interface on the Python Package Index. Download the one that is suitable for your Python version (currently there are binary packages for Python 2.6, Python 2.7 and Python 3.2, though it might change in the future). To test the installed package, launch your favourite Python IDE and type the following:
import igraph.test
igraph.test.run_tests()
The above commands run the bundled test cases to ensure that everything is fine with your igraph installation.
Now, you can download 'python_geohash‑0.8.5‑cp36‑cp36m‑win_amd64.whl'.
Use the following command to install:
pip install python_geohash‑0.8.5‑cp36‑cp36m‑win_amd64.whl
Then you can use python-igraph in your Python3.6

Using pip version with Python 3.x alongside Python 2.x on Windows

My question is thoroughly based on this question. The big difference is I'm focusing on windows here. The answers/question provided there were for unix distributions.
I've ran Python 2.x for quite a while and have used pip with no problems.
Now I've installed python 3 but when I open the cmd prompt and pip install somemodule it tries to install it for python 2. How can I deal with this situation ?
Both Python's were installed with the Anaconda distribution so I believe both of them come with pip installed. Note: This info come from this question
EDIT:
Found this answer which addresses that issue.
But now when I try to run the command
pip3.5 install pymssql
or
pip-3.5 install pymssql
I get the error pip3.5 is an unknown command.
If I open cmd and type python I receive:
Python 3.5.1 Anaconda 4.0.0
so it shouldn't be a version problem
You will want to make sure you have the correct Anaconda environment activated, which it looks like you have in this case.
conda env list # Display the list of conda environments
In the Windows Command Prompt you should just need to use:
activate py35 # Or whatever your Python 3.5 environment is called. (Mine is root)
pip install pymssql
Instead of pip-3.5.
To install it in another environment (mine is called py27):
activate py27
pip install pymssql
I successfully used this command in both my Python 2.7 and 3.5 Anaconda environments.
To go back to your primary environment (root), just type activate without an environment name after it

Anaconda Pymc Install

When attempting to install pymc via conda, I receive the following:
C:\Anaconda>conda install -c https://conda.binstar.org/pymc pymc
Fetching package metadata: ...
Error: No packages found matching: pymc
The install is from the pymc distribution page: https://binstar.org/pymc/pymc
My current version of anaconda is up to date:
C:\Anaconda>conda update --prefix C:\Anaconda anaconda
Fetching package metadata: ..
Solving package specifications: .# All requested packages already installed.
# packages in environment at C:\Anaconda:
#
anaconda 1.9.2 np18py27_0
So as a conda newbie, I'm not quite sure what I'm missing. Perhaps I have to authorize binstar first? (No proxy issues I believe.)
Much appreciate your suggestions!
That build of pymc is only built for OS X 64-bit, Windows 32-bit, and Linux 64-bit (see https://binstar.org/pymc/pymc/2.3.2/files). I'm guessing you have Windows 64-bit. You should contact the pymc devs to see if they can build a 32-bit Windows version.
Try using:
!conda install pymc --yes
It should work. The --yes here used to skip a pause.
You can try to install an unofficial version for Windows 64-bit from here http://www.lfd.uci.edu/~gohlke/pythonlibs/

Resources