burgertrio.blogg.se

Conda install package into a specific environment
Conda install package into a specific environment













conda install package into a specific environment

So in this case, conda does not know about the pip package, but the package is available to python. However, if I do: (new)>pip list // the local package installed above is present If I then later create a new conda env with python=2.7 (= the default): >conda create -name newĪnd then do: (new)>conda list // empty - conda is not aware of any packages yet usr/local/anaconda/lib/python2.7/site-packages Note I am using the conda version of pip!Į.g., if I'm using python2.7 it puts the local package here: It installs a package that is visible to all the conda envs that use To install a local package with a setup.py, I think what's missing here is that when you do: >pip install. Using conda, I can now manage (almost) all of my packages with a single approach rather than having a mix of stuff installed with conda, pip, easy_install, and python setup.py install.įor context, I think this recent blog post by Oliphant will be helpful for people like me who do not appreciate everything that goes into robust Python packaging but certainly appreciate when stuff "just works".

conda install package into a specific environment

Previously, I had installed some of these using pip, so I did pip uninstall PACKAGE prior to installing PACKAGE with conda. That tar.bz2 file is the build that you now need to actually install.Ģ) conda install C:\Anaconda\conda-bld\win-64\prettyplotlib-0.1.3-py27_0.tar.bz2įollowing these steps I have successfully used conda to install a number of packages that do not come with Anaconda. $ binstar upload C:\Anaconda\conda-bld\win-64\prettyplotlib-0.1.3-py27_0.tar.bz2 If you want to upload this package to later, type: At the end of the build you'll be asked if you want to upload the build to binstar. At the time of this writing I have found that I need to edit most meta.yaml files like this for external packages I am installing with conda, meaning that there is a blank import line causing the error along with a redundant import of the given package.ġc) Rerun the command from 1a, which should complete with out error this time. For example, here is how mine looked for prettyplotlib test: # Python imports imports:Įdit this section to remove the blank line preceded by the - and also remove the redundant prettyplotlib line. Presently, the packages being set up like in step 1a result in yaml files that have an error in the test section. Import None Synta圎rror: cannot assign to None TESTS FAILED: prettyplotlib-0.1.3-py27_0ġb) Go into /conda-recipes/prettyplotlib and edit the meta.yaml file. I saw this errorįile "C:\Anaconda\conda-bld\test-tmp_dir\run_test.py", line 23 You'll see the build messages all look good until the final TEST section of the build.

CONDA INSTALL PACKAGE INTO A SPECIFIC ENVIRONMENT WINDOWS

You can read this thread here, but I'll describe the approach below to hopefully make the answers to the OP's question more complete.Įxample: I am going to install the excellent prettyplotlib package on Windows using conda 2.2.5.ġa) conda build -build-recipe prettyplotlib

conda install package into a specific environment

Recently I asked about this on the Anaconda user group and heard from Oliphant himself on the best way to use conda to build and manage packages that do not ship with Anaconda. Would look like everything worked but I could not successfully import PACKAGE. I followed Kerkez's answer and have had mixed success. Then you'll have everything managed using conda. But it usually boils down to: conda skeleton pypi PACKAGEĪlso when you have built them once, you can upload them to and just install from there. There is a git repository of example recipes on the continuum's github account. I would personally recommend the third option since it's very easy to build conda packages. (This is not that trivial if you're on Windows.)īuild your own conda packages, and manage everything with conda. Install in your environment only the python, pip and distribute packages and manage everything with pip. You can take the union of the conda list and pip freeze and manage packages that were installed using conda (that show in the conda list) with the conda package manager and the ones that are installed with pip (that show in pip freeze but not in conda list) with pip.

conda install package into a specific environment

And pip will give you the packages that were either installed using the pip installer itself or they used setuptools in their setup.py so conda build generated the egg information. Conda will only keep track of the packages it installed.















Conda install package into a specific environment