PackagesNotFoundError: py-xgboost-gpu - python

I'm trying to install py-xgboost-gpu on a Mac as XGBoost instructs on the website but I'm getting a PackagesNotFoundError
I'm running
conda install -c conda-forge py-xgboost-gpu
and getting
PackagesNotFoundError: The following packages are not available from current channels:
- py-xgboost-gpu
Any idea why?

GPU builds are for CUDA, which means NVIDIA hardware and Apple doesn't use that in their products. Hence, there is no such support. Instead, follow the instructions for CPU:
conda install -c conda-forge py-xgboost-cpu
Really, one shouldn't even need to specify:
conda install -c conda-forge xgboost
includes py-xgboost and on macOS it defaults to -cpu version.

Related

conda and mamba were broken (segmentation fault) after installing "conda install -c asmeurer glibc"

I am a Thai microbiologist try to use command line.
I installed "Ubuntu 20.04 on Windows" then bowtie2 by conda:
conda install -c bioconda bowtie2
and then check version of the bowtie2. it is 2.2.5 but I need 2.4.5. the con labels is weird like this https://github.com/BenLangmead/bowtie2/issues/397 but that is not the main point.
I try everything on the Internet.
finally, it worked on MacOX somehow.
but for "Ubuntu 20.04 on Windows" because bowtie2 is not compatible with current GLIBC and glibc after I ran:
conda install -c asmeurer glibc
after this glibc was installed, conda return nothing, mamba return "segmentation fault" and
the bowtie2 was upgraded to 2.3.5.1. (the scenario is like this https://www.biostars.org/p/433973/). It is like I broke the conda and mamba.
Do I need to uninstall "Ubuntu 20.04 on Windows"? or can I just delete whole miniconda3 folder and then re-install it?
thank you in advance
Chooseel
Broken Conda environments can be repaired externally using Micromamba (see this answer). No need to uninstall stuff. But if you want to start clean, it should be sufficient to reinstall Conda.
Please be aware that users generally will have a better experience not working from the base environment. Instead, create dedicated environments for the various tasks/projects. That is, use
mamba create -n bowtie -c conda-forge -c bioconda bowtie2
Also, mixing channels can lead to issues. Bioconda has very explicit requirements in channel priority:
channels:
- conda-forge
- bioconda
- defaults

module fbprophet incompatible for python 3.7.* and higher?

Has anyone successfully tried installing fbprophet on anaconda?
When i try to install it, i get an incompatibility error.
I'd be very surprised if there isn't fbprophet for python 3.7 +
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
fbprophet -> python[version='2.7.|3.5.|3.6.*']
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 s
omehow not available for the python version you are constrained to. Note that conda wil
l not change your python version to a different minor version unless you explicitly sp
ecify that.
There is a version for python 3.7, and I am able to install successfully. Can you try to use conda-forge and defaults channels together and see if it is available?
conda install fbprophet -c conda-forge -c defaults --override-channels
I had problems when using -c conda-forge only, so i suspect the necessary compatible packages are spread across different channels/locations.
These are the versions that are compatible with Python 3.7:
(ds_tensorflow) >>conda search fbprophet -c conda-forge -c defaults --override-channels | grep py37
fbprophet 0.5 py37h6538335_0 conda-forge
fbprophet 0.5 py37h6538335_1 conda-forge
fbprophet 0.5 py37h6538335_2 conda-forge
fbprophet 0.5 py37h6538335_3 conda-forge
fbprophet 0.6 py37h6538335_0 conda-forge
I have managed to fix this. I downloaded the fbprophet zipped package for Windows from the github repo, extracted the contents and launched anaconda, cd to condabin, then ran pip install specifying the path to the package folder.
Hope this helps anyone stuck in the same situation !!!
Regards,
Ochen

Microsoft Visual C++ 14.0 is required - error - pip install fbprophet

I am trying pip install fbprophet.
I am getting that error: "Microsoft Visual C++ 14.0 is required"
It has been discussed many times (e.g. Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)
) , but seems no answer helps me.
My environment:
Windows 7
Anaconda - just installed
Mirosoft VC 2017 - just installed ( It is not version 14, but it is newer - it seems impossible to load 14 (2015) version from MS site )
MS VC Build Tools - also just installed
computer has been relauched after installations
I had the same problem but I solved using these instructions:
https://facebook.github.io/prophet/docs/installation.html
From that page, you can go to the installation instructions for PyStan (which is needed) in which is specified how to install a C++ compiler for the libraries.
tl;dr -> conda install libpython m2w64-toolchain -c msys2
It does not install MS compiler, but it worked on my case and I had also errors regarding the compiler (also had VS2017 installed). I run Windows 10 and latest Anaconda distribution. I hope it helps.
I could not solve it in the latest version of Anaconda which is 5.3.0. Upon extensive googling, I found a thread on github that advised me to go back to the previous version of Anaconda which is 5.2.0.
With that, it worked fine.
Thanks for taking time to look into it though.
VictorHMartin's answer (and following the details from the links provided) worked perfectly fine for me as long as I tried using them with Python 3.7. However, I needed to get them working with Python 3.9, where the last two conda commands failed and I had to use pip instead; here's the list of commands that worked for me:
conda create -n venv (replace venv name as you like)
activate venv
conda install libpython m2w64-toolchain -c msys2
conda install numpy pandas cython -c conda-forge
conda install matplotlib scipy plotly -c conda-forge (fbprophet optionally needs plotly for interactive plots)
pip install pystan (conda install pystan -c conda-forge failed here for P3.9)
pip install fbprophet (conda install fbprophet -c conda-forge failed here for P3.9)
I add -c conda-forge and seems succeeded.
try this:
conda install -c conda-forge fbprophet

How to install pytorch in Anaconda with conda or pip?

I am trying to install pytorch in Anaconda to work with Python 3.5 in Windows. Following the instructions in pytorch.org I introduced the following code in Anaconda:
pip3 install torch torchvision
But the following error came in:
Command "python setup.py egg_info" failed with error code 1 in C:\Users\sluis\AppData\Local\Temp\pip-install-qmrvz7b9\torch\
By searching on the web I found out that it may be because of setuptools being out of date but I checked and have it updated. I also tried:
conda install -c peterjc123 pytorch cuda80
But the following error arise:
The following specifications were found to be in conflict:
- pytorch
Use "conda info <package>" to see the dependencies for each package.
I also tried to load the pytorch's tar.bz2 file which I download in the following website:
anaconda.org/peterjc123/pytorch/files
And then just do:
$ conda install filename.tar.bz2
But I got the following error:
Error: HTTPError: 404 Client Error: None for url: file:///C|/Users/sluis/pytorch-0.3.1-py36_cuda80_cudnn6he774522_2.tar.bz2: file:///C|/Users/sluis/pytorch-0.3.1-py36_cuda80_cudnn6he774522_2.tar.bz2
I am quite new to this programming world so I don't really know how to dig more on the errors. Anyone knows how to get pytorch installed?
Edit: As suggested in the comments I tried:
conda install pytorch torchivsion -c pytorch
And I got the following error:
Error: Packages missing in current win-64 channels:
- pytorch
- torchvision
I did:
anaconda search -t conda torchvision
And tried to install dericlk/torchvision using the following command:
conda install -c derickl torchvision
But I am getting the same error:
Error: Package missing in current win-64 channels:
- torchvision
I couldn't find any torchvisionpackages for win-64.
conda list is giving me the following:
# packages in environment at C:\Users\aaaa\AppData\Local\Continuum\Anaconda3\envs\torchenv2:
#
mkl-include 2018.0.2 1 anaconda
certifi 2016.2.28 py35_0
cffi 1.10.0 py35_0
cmake 3.6.3 vc14_0 [vc14]
openmp 2018.0.0 intel_8 intel
mkl 2017.0.3 0
numpy 1.13.1 py35_0
pip 10.0.0 <pip>
pip 9.0.1 py35_1
pycparser 2.18 py35_0
python 3.5.4 0
pyyaml 3.12 py35_0
setuptools 36.4.0 py35_1
typing 3.6.2 py35_0
vc 14 0
vs2015_runtime 14.0.25420 0
wheel 0.29.0 py35_0
wincertstore 0.2 py35_0
zlib 1.2.11 vc14_0 [vc14]
=======
Go to the official PyTorch.org and follow the steps accordingly.
Select your preferences and you will see an appropriate command below on the page.
If you don't have GPU in the system, set CUDA as None or CPU
Example command:
conda install pytorch-cpu torchvision-cpu -c pytorch
The following worked for me. First install MKL:
conda install -c anaconda mkl
After this, install pytorch and torchvision:
conda install -c pytorch pytorch torchvision
For windows python 3.6 and above without cuda
pip install torch==1.2.0+cpu torchvision==0.4.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
Can you please try with below steps
conda create -n pytorch_env python=3.5
source activate pytorch_env
conda install -c soumith pytorch
python
> import torch
You can even find pytorch after you execute command conda list.
For linux, cuda9.0, python3.6:
pip3 install http://download.pytorch.org/whl/cu90/torch-0.3.1-cp36-cp36m-linux_x86_64.whl
pip3 install torchvision
For other cuda/python version: check website: https://ptorch.com/news/145.html
try updating the base conda package with the following command,then you can try reistalling it.
conda update --all
conda update -n base conda
For me it worked doing this:
Uninstall the previous version: go to C:\users\username\anaconda3 and run the anaconda-uninstall.exe
Install again anaconda
then run the following commands on the anaconda pompt:
conda create -n my_env python=2.7
conda activate my_env
start the gui app
conda install -c peterjc123 pytorch
anaconda-navigator
For Readers live in 2021/06/xx:
use pip3 install torch
As an update, now the Pytorch official site has the right version depending on your system:
https://pytorch.org/
I recommend using the official website for installation. Some of the previous awnsers may lead to a version that is not adequate.
After Activating conda environment
Use below command
python3 -m pip install torch torchvision
Example
(torchenv) ubuntu#user :~$ python3 -m pip install torch torchvision
Visit https://anaconda.org/pytorch/torchvision and you will find the solution
conda install -c pytorch torchvision
Try running:
conda install -c pytorch pytorch

Issues installing pytorch for OS X with conda

I used to have pytorch working for python 3 on OS X but now I can't get it to install automatically for some reason (I don't want to do from source).
I did:
conda install pytorch torchvision -c pytorch
as the website suggested... then I got a mkl error so I installed it but it still complains about it:
(FTIR_py3) brandomiranda~/home_simulation_research/FTIR/FTIR_proj $ conda install pytorch torchvision -c pytorch
Fetching package metadata ...........
Solving package specifications:
PackageNotFoundError: Package not found: '' Dependencies missing in current osx-64 channels:
- pytorch -> mkl >=2018
- torchvision -> pytorch >=0.3 -> mkl >=2018
You can search for packages on anaconda.org with
anaconda search -t conda mkl
You may need to install the anaconda-client command line client with
conda install anaconda-client
but I do have mkl:
(FTIR_py3) brandomiranda~/home_simulation_research/FTIR/FTIR_proj $ conda install mkl
Fetching package metadata .........
Solving package specifications: .
# All requested packages already installed.
# packages in environment at /Users/brandomiranda/miniconda3/envs/FTIR_py3:
#
mkl 2017.0.3 0
anyone know whats going on? it used to work a few days ago...
longer thread on pytorch forum:
https://discuss.pytorch.org/t/issues-installing-pytorch-for-os-x-with-conda/11496
As suggested in PyTorch forum, I think you should first install MKL. Your error trace also says that MKL is missing in your system. You can install MKL by doing:
$ conda install -c anaconda mkl
After this, install pytorch and torchvision by
$ conda install -c pytorch pytorch torchvision
Update conda first with conda update conda and try again.
It helped in my case.
Disclaimer: I didn't come up with this myself, but rather copied from github issue.

Categories