conda / conda-docs Goto Github PK
View Code? Open in Web Editor NEWConda documentation
Conda documentation
In the section Get Started -> Installation -> Centralized installation -> Overview -> Default channels
the example shows if for channels not default_channels.
This attribute appears now in pypi skeleton files, but you have to go to the source or the PR introducing it to really understand what it is doing.
The build framework documentation mentions in step 7 that it does some shebang line modifications, but it doesn't say what you have to do to trigger it. We should discourage people from using this kind of shebang line: #!/usr/bin/env <binary>
and instead use $PREFIX in their build scripts. I'm not sure of the best way to do this, but we should spell it out for people
Here is how I hacked on support for nodejs binaries which use /usr/bin/env node
which makes them unsafe unless you have activated the environment: conda/conda#492
I think these have only been added in the build.sh. Can we document which ones are present in build.sh and which ones are available in post-link scripts?
I think these added variables are not documented:
Variables that have been added: conda/conda#368
The doc says:
Miniconda is a small “bootstrap” version that includes only conda and conda-build, and installs Python. Over 720 scientific packages and their dependencies can be installed individually from the Continuum repository with the “conda install” command.
But after a miniconda download and install, the conda build command fails:
conda build --help
Error: You need to install conda-build in order to use the 'conda build'
command.
I could not build the pdf both on Sphinx 1.4.1 and on using current master branch of Sphinx repo.
I fixed it by doing
diff --git a/docs/source/index.rst b/docs/source/index.rst
index bbc7ec4..db5df31 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -7,7 +7,7 @@
Conda
=====
-.. figure:: images/conda_logo.svg
+.. figure:: images/conda_logo.*
:align: center
.. raw:: html
and by putting in images
a version usable by LaTeX, for my test I used pdf
format as obtainable via ImageMagick convert conda_logo.svg conda_logo.pdf
. But possibly you can export to pdf directly from original software (perhaps InkScape ?)
@scopatz commented on Thu Jan 05 2017
but py
acts like an integer since you can do py >= 35
and other numeric comparisons. I suspect that this is wrong.
see http://conda.pydata.org/docs/building/meta-yaml.html#preprocessing-selectors
Would be good to list py36
in the selector list officially.
Hi,
I tried to install a package, which updated the conda as well. This failed because of the permission denied error. But now I am missing conda
command.
conda install mpi4py
Fetching package metadata: ....
Solving package specifications: .
Package plan for installation in environment /phengs/hpc_software/anaconda/2.2.0:
The following packages will be downloaded:
package | build
---------------------------|-----------------
mpich2-1.4.1p1 | 0 2.6 MB
openssl-1.0.2h | 0 3.2 MB
mpi4py-2.0.0 | py27_1 1.7 MB
setuptools-20.7.0 | py27_0 453 KB
wheel-0.29.0 | py27_0 81 KB
conda-4.0.6 | py27_0 185 KB
pip-8.1.1 | py27_1 1.5 MB
------------------------------------------------------------
Total: 9.7 MB
The following NEW packages will be INSTALLED:
mpi4py: 2.0.0-py27_1
mpich2: 1.4.1p1-0
The following packages will be UPDATED:
conda: 3.19.1-py27_0 --> 4.0.6-py27_0
openssl: 1.0.2f-0 --> 1.0.2h-0
pip: 8.0.2-py27_0 --> 8.1.1-py27_1
setuptools: 19.6.2-py27_0 --> 20.7.0-py27_0
wheel: 0.26.0-py27_1 --> 0.29.0-py27_0
Proceed ([y]/n)?
Fetching packages ...
mpich2-1.4.1p1 100% |##########################################################################################################################################| Time: 0:00:03 737.06 kB/s
openssl-1.0.2h 100% |##########################################################################################################################################| Time: 0:00:04 690.64 kB/s
mpi4py-2.0.0-p 100% |##########################################################################################################################################| Time: 0:00:02 677.13 kB/s
setuptools-20. 100% |##########################################################################################################################################| Time: 0:00:00 574.17 kB/s
wheel-0.29.0-p 100% |##########################################################################################################################################| Time: 0:00:00 308.65 kB/s
conda-4.0.6-py 100% |##########################################################################################################################################| Time: 0:00:00 425.50 kB/s
pip-8.1.1-py27 100% |##########################################################################################################################################| Time: 0:00:02 645.61 kB/s
Extracting packages ...
[ COMPLETE ]|#############################################################################################################################################################| 100%
Unlinking packages ...
[ COMPLETE ]|#############################################################################################################################################################| 100%
Linking packages ...
An unexpected error has occurred, please consider sending the | 0%
following traceback to the conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Include the output of the command 'conda info' in your report.
Traceback (most recent call last):
File "/phengs/hpc_software/anaconda/2.2.0/bin/conda", line 5, in <module>
File "/phengs/hpc_software/anaconda/2.2.0/lib/python2.7/site-packages/conda/cli/main.py", line 201, in main
args_func(args, p)
File "/phengs/hpc_software/anaconda/2.2.0/lib/python2.7/site-packages/conda/cli/main.py", line 208, in args_func
args.func(args, p)
File "/phengs/hpc_software/anaconda/2.2.0/lib/python2.7/site-packages/conda/cli/common.py", line 612, in inner
return func(args, parser)
File "/phengs/hpc_software/anaconda/2.2.0/lib/python2.7/site-packages/conda/cli/main_install.py", line 46, in execute
install.install(args, parser, 'install')
File "/phengs/hpc_software/anaconda/2.2.0/lib/python2.7/site-packages/conda/cli/install.py", line 413, in install
plan.execute_actions(actions, index, verbose=not args.quiet)
File "/phengs/hpc_software/anaconda/2.2.0/lib/python2.7/site-packages/conda/plan.py", line 527, in execute_actions
inst.execute_instructions(plan, index, verbose)
File "/phengs/hpc_software/anaconda/2.2.0/lib/python2.7/site-packages/conda/instructions.py", line 148, in execute_instructions
cmd(state, arg)
File "/phengs/hpc_software/anaconda/2.2.0/lib/python2.7/site-packages/conda/instructions.py", line 91, in LINK_CMD
link(state['prefix'], arg, index=state['index'])
File "/phengs/hpc_software/anaconda/2.2.0/lib/python2.7/site-packages/conda/instructions.py", line 87, in link
install.link(pkgs_dir, prefix, dist, lt, index=index)
File "/phengs/hpc_software/anaconda/2.2.0/lib/python2.7/site-packages/conda/install.py", line 606, in link
_link(src, dst, lt)
File "/phengs/hpc_software/anaconda/2.2.0/lib/python2.7/site-packages/conda/install.py", line 136, in _link
shutil.copy2(src, dst)
File "/phengs/hpc_software/anaconda/2.2.0/lib/python2.7/shutil.py", line 130, in copy2
copyfile(src, dst)
File "/phengs/hpc_software/anaconda/2.2.0/lib/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/phengs/hpc_software/anaconda/2.2.0/etc/mpe_log.conf'
How do I get it back?
conda install -c asmeurer conda-docs-deps
conda install -n root conda-build
make html
until cd into docs
directory (step missing from instructions?).make html
python scrape_help.py
File "scrape_help.py", line 86
(info['default_prefix'].encode('utf-8'), rb'default prefix'),
^
SyntaxError: invalid syntax
make: *** [command-html] Error 1
info['default_prefix'].encode('utf-8'], ...
in the listing below - not obviously wrong, so maybe a Python version problem?:def man_replacements():
# XXX: We should use conda-api for this, but it's currently annoying to set the
# root prefix with.
info = json.loads(str_check_output(['conda', 'info', '--json']))
# We need to use an ordered dict because the root prefix should be
# replaced last, since it is typically a substring of the default prefix
r = OrderedDict([
(info['default_prefix'].encode('utf-8'), rb'default prefix'),
(pathsep.join(info['envs_dirs']).encode('utf-8'), rb'envs dirs'),
# For whatever reason help2man won't italicize these on its own
(info['rc_path'].encode('utf-8'), rb'\fI\,user .condarc path\/\fP'),
# Note this requires at conda > 3.7.1
# Workaround for earlier versions in Travis CI. Remove when 3.7.2 is released.
(info.get('sys_rc_path', '/home/travis/miniconda.condarc').encode('utf-8'), rb'\fI\,system .condarc path\/\fP'),
(info['root_prefix'].encode('utf-8'), rb'root prefix'),
])
Discussed in conda/conda#1527 and mentioned by @bkreider .
On http://conda.pydata.org, the first thing a user sees is a large mailing list signup. This is not typical for an open source project, and probably does a lot to contribute to the prevalence of the misconception that conda is a proprietary platform.
Would it be possible to move/remove that form from the landing page, and instead have more prominently outline the ways to install conda?
Need a changelog page on conda.pydata.org/docs. I guess it'll need to be its own, new page.
Mostly just copy https://github.com/conda/conda/blob/master/CHANGELOG.txt
Another possibility would be to copy https://github.com/conda/conda/releases which has the issue/PR linking already done.
Be sure to leave off any unreleased changes (right now 4.2.0).
The Features 'section' pointed to by several of the meta.yaml sections (e.g. build.Features) is still written with the assumption that 'nomkl' is the default. However, that behavior changed earlier this year with Anaconda 2.5
While this isn't the most dire of issues, newcomers to conda-build may find it highly confusing.
Also, now that continuumio/anaconda-recipes exists, perhaps the Features section could link to some examples of it's usage in there? I'm happy to submit a PR for this.
The test drive file (https://github.com/conda/conda-docs/blob/master/docs/source/test-drive.rst) section two states
Conda displays the list of all environments, with the current environment shown in (parentheses) in front of your prompt:
.. code::
(snowflakes)
but with conda version 3.19 on windows, it instead shows the current environment name with brackets, i.e.
Conda displays the list of all environments, with the current environment shown in [brackets] in front of your prompt:
.. code::
[snowflakes]
TODO:
_complete_source_activate_conda(){
if [ ${COMP_WORDS[COMP_CWORD-1]} != "activate" ]
then
return 0
fi
local current_string=${COMP_WORDS[COMP_CWORD]}
local env_list=$(conda env list | sed '1d;2d;$d' | awk {'print $1'})
COMPREPLY=($(compgen -W '${env_list[@]}' -- "$current_string"))
return 0
}
complete -F _complete_source_activate_conda source
They are cross-referenced here, but the link doesn't show anything about env variables: http://conda.pydata.org/docs/build_tutorials/pkgs2.html#more-information-on-environment-variables
page http://conda.pydata.org/docs/_downloads/conda-pip-virtualenv-translator.html currently shows :
Task | Conda package and environment manager command |
---|---|
Update a package | conda update --name $PACKAGE_NAME |
but it should be :
Task | Conda package and environment manager command |
---|---|
Update a package | conda update --name $ENVIRONMENT_NAME $PACKAGE_NAME |
I would do a pull request, but I can not find that page on github. Thanks.
The doc is wrong here (cf changelog of conda build).
The old conda cheat sheet appears to be here:
http://conda.pydata.org/docs/_downloads/conda-cheatsheet.pdf
Needs to be replaced with the revised cheat sheet,
Conda-Cheat-Sheet-PDF.pdf
attached.
I just followed the Using conda with Travis CI tutorial. In fact, my own .travis.yml
file is right here.
After installing my own package, when running nosetests
, I am presented with the following message:
Failure: ImportError (No module named 'scipy')
Is there a problem in the tutorial? Or did I do something wrong?
hi,
i am conda-building a package that has a setup.py. i have used install_requires
option in setup(), to keep track of my package's run-time dependencies. however, meta.yaml
has both a build
and run
requirements. my question is: since conda-build will install my package by running setup.py
, which contains run-time dependencies in install_requires
, how are run
and build
sections in meta.yaml
different?
Many recipes seem to use a field
source:
fn:
Yet I can find no documentation for this at https://conda.io/docs/building/meta-yaml.html .
I tried installing conda on openbsd6 but i got this ValueError: openbsd6 is not a valid Platform
the complete output:
Traceback (most recent call last):
File "/usr/local/bin/conda", line 9, in
load_entry_point('conda==4.2.7', 'console_scripts', 'conda')()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 558, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2682, in load_entry_point
return ep.load()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2355, in load
return self.resolve()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2361, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/local/lib/python2.7/site-packages/conda/cli/init.py", line 8, in
from .main import main # NOQA
File "/usr/local/lib/python2.7/site-packages/conda/cli/main.py", line 46, in
from ..base.context import context
File "/usr/local/lib/python2.7/site-packages/conda/base/context.py", line 13, in
from .constants import DEFAULT_CHANNELS, DEFAULT_CHANNEL_ALIAS, ROOT_ENV_NAME, SEARCH_PATH, conda
File "/usr/local/lib/python2.7/site-packages/conda/base/constants.py", line 82, in
if Platform.from_sys() is Platform.win:
File "/usr/local/lib/python2.7/site-packages/conda/base/constants.py", line 47, in from_sys
return cls(p)
File "/usr/local/lib/python2.7/site-packages/enum/init.py", line 347, in call
return cls.new(cls, value)
File "/usr/local/lib/python2.7/site-packages/enum/init.py", line 662, in new
raise ValueError("%s is not a valid %s" % (value, cls.name))
Fails with:
Uncaught TypeError: Cannot read property 'length' of undefined (searchtools.js:543)
in JS console.
Adding the channel jlaura for json-c dependency has no effect.
The package json-c is still missing when I run conda build:
~/postgis$ conda build .
Here is the output:
Fetching package metadata ...........
Solving package specifications: .
Error: Package missing in current linux-64 channels:
conda/constructor#38 , passed on to me by @csoja. Need to:
bld.bat
copy an icon and a menu JSON into their Menu
folder." (As opposed to the Menu
folder of the Miniconda3 root installation.)It will need to wait for the next version of conda after 3.7.1.
Below the fifth paragraph on this page, there is a broken link in the text:
"See also: Conda configuration file."
This github repo should link back to hosted documentation.
Original paragraph reads as follows:
With this pinned file, conda update numpy
will keep numpy at 0.7.1, and conda install scipy=0.14.0
will lead to an error. To force either of these, use the -no-pin
flag, like conda update numpy --no-pin
. The way pinning works is that the pined specs are included with each conda install, so subsequent commands without --no-pin
will revert numpy back to the 1.7 series.
This paragraph should instead read:
With this pinned file, conda update numpy
will keep numpy at 1.7.1:arrow_backward:, and conda install scipy=0.14.0
will lead to an error. To force either of these, use the --no-pin
conda update numpy --no-pin
. The way pinning works is that the pinned:arrow_backward: specs are included with each conda install
or conda update
command:arrow_backward:, so subsequent commands without --no-pin
will revert numpy back to the 1.7 series.
Emojis added to highlight the changes
Original reads:
After performing the above command you can create a new environments in the standard way (the scipy will be installed in all of them).
Should instead be:
After performing the above command you can create new environments in the standard way (scipy will be installed in all of them).
Original reads:
After performing the above command you can create a new environments in the standard way (the scipy in 0.12.0 version will be installed in all of them).
Should instead be:
After performing the above command you can create new environments in the standard way (scipy version 0.12.0 will be installed in all of them).
If you've got it, you're going to use it. Let's document how these parts of the conda [un]install
lifecycle should play out. Perhaps if some stronger language existed, we would not have gone down this path on the various nbextensions
@ilanschnell When post-link scripts output things, it is probably important (usually some error message). In this case, the post-link script is used in a way that it was never designed for. I think we have to better communicate the purpose of these scripts.
Post-link (and pre-unlink) scripts should:
1.) be avoided whenever possible
2.) not touch anything other than the files being installed
3.) not write anything to stdout (or stderr), unless an error occurs
4.) not depend on any installed (or to be installed) conda packages
5.) only depend on simple system tools rm, cp, mv, ln, etc.
The main doc page at conda.pydata.org is out of date, mentioning "Anaconda Pro" etc. Additionally, WRT to relations to paid products, suggest that the page only have one sentence with a link to a CIO hosted page for those integrations. This is not the right place for product advertisement.
Please give an example of a requirement on a particular version and build number. It is unclear of what delimiter is to be used and syntax.
-mypackage-2.3-1 does not seem to be the right syntax.
Appears PY_VER
is missing from the conda-build
environment variables in the docs. It should be added.
cc @msarahan
The from scratch page on how to build a conda recipe begins by saying we will copy an existing (or rather non-existent) recipe. I actually find it quite difficult to follow such a tutorial because I end up not understanding what I'm doing. Hence this. =P
If you google for "conda travis", the second search result is http://conda-test.pydata.org/docs/travis.html. Based on the URL, I'm assuming this isn't something that should be used publicly.
It looks like the "default_channels" configuration value for .condarc, lets you redefine where the "defaults" alias points to.
@dolfim commented on Fri Jan 06 2017
I think the documentation should state more clearly that binary prefix replacement is not fully supported on Windows.
The only comment about it that I could find is in the conda sources:
# on Windows for binary files, we currently only replace a pyzzer-type entry point
# we skip all other prefix replacement
https://github.com/conda/conda/blob/master/conda/core/portability.py#L87
@msarahan commented on Fri Jan 06 2017
I'm not clear on why this needs to be documented. Binary prefixes only affect Linux and Mac as far as we've been able to see. They actually break lots of stuff on Windows because of Windows' 260 character path limit (which has been very recently removed, but still needs to be respected for quite a while.)
@dolfim commented on Fri Jan 06 2017
My point is that the docs does not state clearly that prefix replacement in binary is supported only on Mac and Linux. It explains how this is done on those systems, but after reading a few times I was still sure that some other black magic was implemented for Windows.
@msarahan commented on Fri Jan 06 2017
OK, fair enough. I'll move this issue to the docs repo and try to fix it soon.
When 'conda info -e' starts using ((double parentheses)) around the active environment, correct the test drive to say so, as explained in #248 and conda/conda#1727 .
Hi
New to Conda. Just installed it. Conda python version is 3.6.
When I try to setup bash completion via https://conda.io/docs/install/tab-completion.html I get:
- argcomplete -> argparse -> python 2.6* -> openssl 1.0.1*
- python 3.6*
Use "conda info <package>" to see the dependencies for each package.
How can I resolve this? Thanks in advance.
My channel is currently being used in the .travis.yml to install several things. While I do not plan to remove any packages from my channel, I would recommend moving all the packages that are used to the official defaults channel, or to conda-forge, and use that instead. I no longer maintain my own channel, preferring to use conda-forge instead. The recipes for every package should be in conda-recipes.
There is a metapackage conda-docs-deps
, which you might want to replace with a conda-env file (or else upload the metapackage to some Continuum-owned channel).
No doubt a minor issue, but after a long overdue git pull, I got:
conda-docs$ git pull
[....]
From https://github.com/conda/conda-docs
2e14d21..7122f68 master -> origin/master
5cac318..b2379d7 gh-pages -> origin/gh-pages
Updating 2e14d21..7122f68
Fast-forward
[...]
docs/source/using/conda-cheatsheet.pdf | Bin 118159 -> 794349 bytes
15 files changed, 158 insertions(+), 119 deletions(-)
When I compare the two conda-cheatsheet.pdf files I see little difference (lines added about Build a Conda package from a Python Package (PyPI) Package) and some more green color in the recent one. Both produced by Adobe Illustrator CC 2015, Adobe PDF library 15.00.
I checked the fonts, and it appears the same font family is used, with the addition of the Medium variant. I know my question is a bit ridiculous. But I always wonder about file sizes !
document conda config --show-sources
Based on a suggestion from @jklowden :
Commands like 'conda --help' and 'conda create --help' often produce text without formatting that could be beneficial, and with lines shorter or longer than they should be, especially on Windows. We could benefit from using formatting more like the manual pages produced by commands such as 'man ls'.
We could fix this by using the groff tools, which would generate PDF, HTML, and man pages. Failing that, we could follow the example of 'git --help', which opens a browser window with a web page or local HTML file to show the formatted documentation.
This change could also incorporate @asmeurer 's idea to ensure that asking for help with a command also shows the help for its subcommands:
Here are James Lowden's original comments; there were also three attachments which I can upload as well, a screenshot, a pdf, and a file 'conda-create.1'.
On Mon, Mar 23, 2015 at 5:32 PM, James Lowden wrote:
Hi Kerry,
First of all, let me say how glad I am we’ve hired someone to work on our documentation. Documentation was one of the first things I mentioned to Travis when I started with Continuum.
Second, I’d like to suggest a way to improve our command-line help by using an old, long-ported tool designed to do the job: groff.
I ran conda create –help today and found the text all but unreadable, see below image. In an attempt to be constructive, I composed a standard man page from the text, with very few changes. (It could still use a push in the direction of the king’s English.)
Please note my version cannot be used verbatim. The –help option evidently is a little bit dynamic; where the environment name should be represented as substitutable parameter, in my page the name of my environment, neat, appears.
I think you’ll agree the PDF is easier to read than the almost unformatted text produced by –help. If you install the .1 file to e.g. /usr/share/man/man1 (or use man ./conda-create.1) in Linux, I think you’ll also agree that is easier to read, even without the full typographic benefit afforded by Postscript.
The question is: How do we provided better help (and on-line documentation) for our command-line tools?
I would like to suggest we use the groff tools. That would let us generate PDF, HTML, and reasonable man pages for Linux and OS X. Groff has been ported to Windows, and would help us improve the appearance of –help. Git used to do that; git-foo --help would invoke groff and put a man page in GNU less for you.
I know we’re a Python shop, and all Python shops are bound to use Sphinx. In the case of the command-line help and documentation, I suggest that’s insufficient to the task. The groff mdoc markup language looks weird at first, but in the end it’s actually the simplest markup toolchain I’ve used, and specifically designed for this kind of documentation.
If we don’t want to emulate man on Windows, there are a couple of other options:
· Use groff to generate formatted text from mdoc sources, and embed that text in the Python for display. Possibly also include escape sequences to supply boldface and underlining. At least this would produce lines of no more than 80 characters, making the text easier for the eye to scan.
· Use groff to generate PDFs (or HTML) and embed that in the Python or a database of same, and have conda foo –help invoke a web browser. That’s what git does. Not my favorite option, but better than what we’re doing now.
I hope you find the above helpful. Happy to discuss at your convenience.
Regards,
--jkl
Post-link scripts can present their output using a temp file, but it is undocumented.
As described here: conda/conda#338
Thanks for adding this feature. This is the documentation request for it.
Referenced here: conda/conda-build#1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.