Anaconda Pymc Install - anaconda

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/

Related

Message "note: This error originates from a subprocess, and is likely not a problem with pip"

While downloading pip install allennlp==1.0.0 allennlp-models==1.0.0, I faced this problem:
[6 lines of output]
running bdist_wheel
running build
running build_py
running build_ext
building 'srsly.msgpack._unpacker' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for srsly
Failed to build thinc blis srsly
ERROR: Could not build wheels for srsly, which is required to install pyproject.toml-based projects
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
I have downloaded:
pip install -vvv torch
pip install numpy
pip3 install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
and it still not working.
I am using Python 3.10.2 on Windows 11 Pro.
What should I do?
I had Python 3.10 and had the same error installing psutil from pip. I fixed the problem by installing an older version of pip using the command:
pip install pip==21.3.1
You have to install the Python 3.9.10 version from python.org and after installation, upgrade your pip and everything will be sorted.
It is the problem in Python 3.10.2... This method is working. I was suffering from the same problem in installing the turtle, so I did that and error was solved.
This particular error is caused by not having a C/C++ compiler installed. As said in the error message, either install MSVC or another compiler to compile it.
Please read your error messages; they are there for a reason.
If you're using a Python 3 image, this might help:
RUN apk update
RUN apk add make automake gcc g++ subversion python3-dev
Reference from Problems with pip install numpy - RuntimeError: Broken toolchain: cannot link a simple C program
https://visualstudio.microsoft.com/visual-cpp-build-tools/
Download and install or update
Microsoft Visual C++ 14.0 or greater is required.
You must be install build visual tools 15, 17, 19, or greater.
Download from Microsoft C++ Build Tools.
To solve this problem, you need to download Visual Studio from its main page.
If Visual Studio is already installed, then when you run the installer, you can modify it (by clicking the modify button):
During Visual Studio installation (or installation modification) choose Desktop Development with C++:
First: You installed the Mingw-w64 compiler with a full MSYS2 package, and this package included Python.
Second: you get the error because the plugin is not in the Python packages installed by MSYS2.
So: uninstall MSYS2 and install a minimalistic MinGW (MinGW - minimalistic GNU for Windows).
And finally Install a version of Python from the official Python page.
Now if you can install plugins.
I've found a similar question from GitHub, and credits goes to thaibee. Here I quote:
It's a problem with Microsoft products and is
very easy to solve.
If you can't install these plugins as well,
need to download it from other repositories like this one:
https://www.lfd.uci.edu/~gohlke/pythonlibs/ depends on the version of python and the system.
For example: for my Windows 11 (x64) and Python 3.10 I took this file: pyodbc‑4.0.32‑cp310‑cp310‑win_amd64.whl
It's very easy to install: pip install pyodbc‑4.0.32‑cp310‑cp310‑win_amd64.whl
After it, the system works well and didn't ask you about VC.
This solution I found in problem with the MySQL plugin for Django. I don't understand why - but they also use VC for the installation process.
I understand your problem, and I have faced it too. I tried multiple solutions, but it didn't work, so I simply uninstalled my Python and installed some older version of it. Example: I recently uninstalled Python 3.10.2 and installed 3.9.10.
It worked without any errors.
I had a similar problem while installing with pip3: building wheel for box2d-py (setup.py) ... error
The solution was just to install SWIG prior to box2d, so I added the following steps manually:
pip install swig
pip install gym[box2d]
For Mac, there is a possible workaround for this problem if you use Conda. The idea is to create an x86 environment on the Mac and do your pip install after that.
conda create -n <name>
conda activate <name>
conda config --env --set subdir osx-64
conda install python=3.8
Here I choose Python 3.8, but you can choose another version.
If you are on macOS (maybe Apple silicon) then first try to do this from your base location of the terminal:
eval "$(/opt/homebrew/bin/brew shellenv)"
Then, do brew update and brew upgrade.
Once you are done with that, type
brew install geos
Now again go to your virtual environment and activate it (if you are working in the virtualenv) and then type:
python3.10 -m pip3 install [module name]
I was facing the same problem when executing:
python -m pip install package-name
After many failed tentatives, what fixed the problem for me was executing:
py -m pip install package-name
When I type py in the terminal, it shows this information:
Python 3.9.8 (tags/v3.9.8:bb3fdcf, Nov 5 2021, 20:48:33) [MSC v.1929 64 bit (AMD64)] on win32
When I type python in the terminal, it shows this information:
Python 3.8.2 (default, Apr 9 2020, 13:17:39) [GCC 9.3.0 64 bit (AMD64)] on win32
I believe that this problem is related to the Python interpreter version.
I tried all recommendations that were written, but none worked. My Python was 3.11.
So I just installed Python 3.8.10 from here:
https://www.python.org/downloads/release/python-3810/
And ran
C:\Python38\python.exe -m pip install matplotlib
And it worked.
I faced a similar problem while installing pandas-datareader.
I was using Python 3.11.0, and after trying all possible solutions, I downloaded Python 9.10.0 and it worked fine.
We can install DVC with the below commands:
conda install -c conda-forge mamba # installs much faster than conda
mamba install -c conda-forge dvc
For more information please refer this: https://dvc.org/doc/install/

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

TensorFlow dependencies needed. How to run TensorFlow on Windows

I am interested in getting TensorFlow to run on Windows, however at present I realize that this is not possible due to some of the dependencies not being usable with Windows, e.g. Bazel.
The need arises because as I currently understand it the only way to access the GPU from TensorFlow is via a non-virtual install of Linux. I do realize I can dual boot into a Linux install, but would prefer to avoid that route.
To resolve the problem I am in need of the entire dependency chain to build TensorFlow as was wondering if this already existed.
I also realize that I can capture the build output when building from source as a solid start, but would like to avoid that work if it is already known.
There is a beta of Bazel that runs on Windows - https://github.com/dslomov/bazel-windows
See related GitHub Issue to run TensorFlow on Windows. - https://github.com/tensorflow/tensorflow/issues/17
Another reason to run on Windows is the possibility to port to Xbox One.
I found a possible answer, still need to check it. This will generate a dependency graph as a dot file.
$ bazel query 'deps(//tensorflow/tools/pip_package:build_pip_package)' --output graph > tensorflow.dependency.dot
There are now three main options for building and/or running TensorFlow on Windows:
You can install a GPU-enabled PIP package of TensorFlow 0.12rc0 from PyPI: pip install tensorflow-gpu
You can build the GPU-enabled PIP package yourself using the experimental CMake build. This also gives you the ability to work with TensorFlow in Visual Studio. The documentation for this build can be found here.
There is preliminary support for building TensorFlow using Bazel for Windows. However, we are still ironing out some bugs with this build.
This may not be exactly what you want one way to run TensorFlow under Windows is to install a virtual machine (VMWare player v12 is free to use for non-commercial) and then install Ubuntu in that and finally TensorFlow in Ubuntu. Works well for me.
Since the begin of 2017, Tensorflow is now officially supported on Windows and can be installed via pip:
pip install --upgrade tensorflow
pip install --upgrade tensorflow-gpu
or by fetching packages directly (pick the one that matches your needs, e.g. x64/gpu)
# x86 / CPU
pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.0-cp35-cp35m-win_x86_64.whl
# x64 / CPU
pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.0-cp35-cp35m-win_amd64.whl
# x64 / GPU
pip install --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.0.0-cp35-cp35m-win_amd64.whl

Pyevolve with Anaconda

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.

Resources