I am looking for a way to download a wheel from a conda environment. Here is what I mean and what I would like to do.
I have this conda environment that I download using this command:
conda install -c bioconda mageck
I would like to have a wheel like mageck.whl in order to reinstall the conda environment offline in a next installation using pip install mageck.whl or any other extension that can let me install all the packages for future installation. The aim is to have a dockerfile that can be 100% reproducible at least from the library version and dependencies, installing the environment only using the package downloaded.
Here are some potential solutions if I understand your problem correctly.
Have you tried to create an isolated software environment?
conda create -c bioconda -n mageckenv mageck
after that, you can activate the environment:
source activate mageckenv
Here you have the link to install using Docker
https://bioconda.github.io/recipes/mageck/README.html
My build keeps failing on windows 10 for installing fbprophet in anaconda with the following message:
ERROR conda.core.link:_execute(502): An error occurred while installing package 'conda-forge::automat-0.7.0-py_1'.
CondaError: Cannot link a source that does not exist. C:\Users\bharat.c.ruparel\AppData\Local\Continuum\anaconda3\Scripts\conda.exe
the command that is given is:
conda install -c conda-forge fbprophet
Has anyone successfully installed fbprophet on Windows 10? If yes, then please give the steps.
Thanks.
I tried pip install as well but no luck. I have a Mac and managed to install fbprophet on it without any issues.
First install Anaconda or miniconda in your Windows machine and add conda python path to env variable as default python.
Open your command prompt and run following commands.
Create a conda virtual environment (optional)
conda create -n v-env python=3.7
activate v-env
Install c++ complier
conda install libpython m2w64-toolchain -c msys2
libpython will automatically create and setup distutils.cfg file for you in PYTHONPATH\Lib\distutils, but if that is failed use the following instructions to setup it manually
[OPTIONAL]
create distutils.cfg with text editor (e.g. notepad, notepad++) and add the following lines to that file.
[build]
compiler=mingw32
Install dependencies
conda install numpy cython -c conda-forge
conda install matplotlib scipy pandas -c conda-forge
Install PyStan
pip install pystan
or
conda install pystan -c conda-forge
Install Ephem
conda install -c anaconda ephem
Install fbprophet
pip install fbprophet
or
conda install -c conda-forge fbprophet
I also faced installing facebook prophet issue in windows 10 without conda.
But,we can solve it.
First, uninstall any pystan, fbprophet.
Then follow the steps below,
python.exe -m pip install pystan==2.17.1.0
python.exe -m pip install fbprophet==0.6
python.exe -m pip install --upgrade fbprophet
Thanks,
tsj
Updated: 28 July 2022
As of v1.0, the package name on PyPI is "prophet"; prior to v1.0 it was "fbprophet". fbprophet is now just prophet. A few additional considerations:
From v0.6 onwards, Python 2 is no longer supported.
As of v1.1, the minimum supported Python version is 3.7.
Below one will find how to
Install with PyPI
Install with Anaconda
Install the Development version
1. Istallation in Python using PyPI
Prophet is on PyPI, so one can use pip to install it.
python -m pip install prophet
2. Installation in Python using Anaconda
One might have to access Anaconda Prompt for the environment that one is working with as admin:
And run
conda-forge: conda install -c conda-forge prophet
Or
conda install -c conda-forge prophet -y
3. Development version
To get the latest code changes as they are merged, one can clone this repo and build from source manually. This is not guaranteed to be stable.
git clone https://github.com/facebook/prophet.git
cd prophet/python
python -m pip install -r requirements.txt
python setup.py develop
By default, Prophet will use a fixed version of cmdstan (downloading and installing it if necessary) to compile the model executables. If this is undesired and one would like to use one's existing cmdstan installation, one can set the environment variable PROPHET_REPACKAGE_CMDSTAN to False:
export PROPHET_REPACKAGE_CMDSTAN=False;
Sources
https://facebook.github.io/prophet/docs/installation.html
https://github.com/facebook/prophet
I've had the same problem. But it works after I follow this steps:
On Prompt install Ephem:
conda install -c anaconda ephem
Install Pystan:
conda install -c conda-forge pystan
Finally install Fbprophet
conda install -c conda-forge fbprophet
Latest installation code for 2021:
pip install pystan==2.19.1.1, then pip install prophet
Also, reboot your jupyter notebook after installation
Install without Conda, Win 10, Python 3.8.8 64 bit.
pip3 install Cython
Then install:
Reboot your maching
Install
pip3 install pystan==2.17.1.0
pip3 install fbprophet
Here's my solution. I have not use conda-forge before, so reading up on this article helps.
Making sure that conda is ≥4.9
conda --version
add conda forge channel
conda config --add channels conda-forge
conda --set channel_priority strict
install gcc
conda install gcc
install prophet
conda install -c conda-forge prophet
I used the prophet documentation here
I faced the same issue and my solution was to:-
Create a new environment with Python3.5
conda create -n pht python=3.5 anaconda
Install Prophet using the command.
conda install -c conda-forge fbprophet
I didn't install 'gcc' although this was advised before installing Prophet.
I am using Python 3.8.5 and conda 4.10.1 on a Windows 10 machine.
I was able to install prophet in Anaconda 2.0.1 using command prompt (not as admin), using: conda install -c conda-forge fbprophet
It took some time for it to figure out the details, as you can see from the prompts below, but finally it was able to install the package.
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: done
I use Anaconda (because it is awesome), and the packages available through conda install are quite extensive. However now and then I do need to install a package that isn't available in the conda repositories, and so get it from pypi instead.
My question: when I run the command conda update --all, will conda also update these pypi packages? Or do I have to update them separately? The conda docs don't seem to contain an answer to this. This question and answer seems to indicate that no, conda does not manage pypi packages, but I'm still uncertain.
No, conda update and conda install don't update packages installed with pip (or install them using pip).
These conda commands only check your "default" anaconda-channels or the ones specified with -c, they ignore everything else. One exception is conda list which shows also the packages installed with pip, these are marked with <pip> and won't be updated.
One example using pip and six:
$ conda create -n testenv python=3.5
Fetching package metadata .................
Solving package specifications: .
Package plan for installation in environment testenv:
The following NEW packages will be INSTALLED:
pip: 9.0.1-py35_1
python: 3.5.3-3
setuptools: 27.2.0-py35_1
vs2015_runtime: 14.0.25123-0
wheel: 0.29.0-py35_0
Proceed ([y]/n)? y
$ activate testenv
Installing six with pip (old version):
(testenv) $ pip install six==1.6
Collecting six==1.6
Downloading six-1.6.0-py2.py3-none-any.whl
Installing collected packages: six
Successfully installed six-1.6.0
conda update doesn't update it (note that six isn't listed in the "all requested packages" but it's listed in conda list):
(testenv) $ conda update --all
Fetching package metadata .................
Solving package specifications: .
# All requested packages already installed.
# packages in environment at testenv:
#
pip 9.0.1 py35_1
python 3.5.3 3
setuptools 27.2.0 py35_1
vs2015_runtime 14.0.25123 0
wheel 0.29.0 py35_0
(testenv) $ conda list
# packages in environment at testenv:
#
pip 9.0.1 py35_1
python 3.5.3 3
setuptools 27.2.0 py35_1
six 1.6.0 <pip>
vs2015_runtime 14.0.25123 0
wheel 0.29.0 py35_0
But it can be upgraded with pip:
(testenv) $ pip install six --upgrade
Collecting six
Using cached six-1.10.0-py2.py3-none-any.whl
Installing collected packages: six
Found existing installation: six 1.6.0
Uninstalling six-1.6.0:
Successfully uninstalled six-1.6.0
Successfully installed six-1.10.0
Just to show that there is a newer version of six in the anaconda channel (which was ignored when I did conda update):
(testenv) $ conda install six
Fetching package metadata .................
Solving package specifications: .
Package plan for installation in environment testenv:
The following NEW packages will be INSTALLED:
six: 1.10.0-py35_0
Proceed ([y]/n)?
Conda 4.6 has an experimental feature to enable interoperability with pip-installed packages. Use conda config --set pip_interop_enabled true. Non-conda-installed python packages that can be "managed" by conda (i.e. removed) may be updated/changed to satisfy the current solve. Manageable packages were typically installed from wheels. Sdists installed with newer versions of pip are also typically manageable. However conda won't switch out the non-conda-installed package for a conda package if the versions are equivalent.
Non-conda-installed python packages that can't be managed will anchor the environment in place until they are removed by other means. An example of unmanageable packages are "editable" installs that used pip install -e.
All of this applies to conda update --all.
This question is old, but here's a batch script that might help with automating this process on Windows. It involves going through conda list and finding packages marked with the pypi tag, which are then subsequently upgraded with pip --upgrade en masse (assuming they are out-of-date; otherwise the standard Requirement already up-to-date message will be returned).
Place the following in a batch file (e.g., condapip.bat) and try it out:
#echo off
set packages=pip install --upgrade
for /f "tokens=1" %%i in ('conda list ^| findstr /R /C:"pypi"') do (call :join %%i)
#echo on
%packages%
#echo off
goto :eof
:join
set packages=%packages% %1
goto :eof
I am new to python and am trying to use the libxml2 package.
This is what I get:
Executed command:
pip install libxml2-python
Error occurred:
Non-zero exit code (1)
Command output:
Collecting libxml2-python
Could not find a version that satisfies the requirement libxml2-python (from versions: )
No matching distribution found for libxml2-python
I am using Kali Linux amd_64, although I have tried on Windows 7 64 and get the same error. I've tried 32 and 64 bit versions of Python 2.7, 3.5.3, 3.6. I am using PyCharm. I have added it to the requirements.txt, tried to add it from there, as well as in both venv and non-venv with different python versions.
I've tried installing it locally, I've tried pip install and easy install, as well as pip install ftp://xmlsoft.org/libxml2/python/libxml2-python-2.6.9.tar.gz
I also installed Anaconda, thinking that would sort it, as it comes with libxml2 pre-installed. When I try to import it in anaconda, I get:
Executed command:
Conda /root/anaconda3/bin/conda install -p /root/anaconda3 libxml2-python==2.6.21 -y
Error occurred:
PackageNotFoundError: Package not found: '' Package missing in current linux-64 channels:
Command output:
PackageNotFoundError: Package not found: '' Package missing in current linux-64 channels:
- libxml2-python ==2.6.21
You can search for packages on anaconda.org with
anaconda search -t conda libxml2-python
You may need to install the anaconda-client command line client with
conda install anaconda-client
The anaconda client is installed.
Also:
conda install -p /root/anaconda3 libxml2 -yFetching package metadata .........
Solving package specifications: .
# All requested packages already installed.
# packages in environment at /root/anaconda3:
#
libxml2 2.9.4 0
Any suggestions are welcome, please help!
I'm trying to install cx_freeze to a virtual environment I've made in anaconda. From within the environment, I type (https://binstar.org/pyzo/cx_freeze):
conda install -c https://conda.binstar.org/pyzo cx_freeze
I get the following message:
Fetching package metadata: ...
Solving package specifications: ..
Error: Unsatisfiable package specifications.
Generating hint:
[2/2 ] |#####################################################################################################################################################################################| 100%
Hint: the following combinations of packages create a conflict with the
remaining packages:
- python 2.7*
- cx_freeze
I'm using anaconda 3.7.4 on python version 2.7.9 on linux-64 Ubuntu 14.
In case conda install cannot install a package because there is a conflict with the version of Python you use:
make sure pip is installed in your current (virtual) Python environment: conda install pip (or conda list to see whether pip is in the list of installed packages)
install your package using pip: pip install <name of your package>