Closed jamesorr closed 4 years ago
That is a bug that has plagued Python and R builds for a while. I guess that this got sorted out for Python modules, but it still exists when parsing R skeletons. The workaround is to use miniconda (or anaconda) for Python 3 to build your packages.
Note that it does not matter the Python version used when running conda-build. Even if you were building Python modules you could still build Python 2 using miniconda3.
BTW I also have r-gsw
and r-oce
(and now r-seacarb
) in the IOOS channel. It would be nice to join efforts to keep those packages up-to-date.
I think this issue can be safely closed. The error seems to have fixed some time in the 4 years since it was opened.
conda skeleton cran seacarb
The command for me works!
Hi there, thank you for your contribution!
This issue has been automatically locked because it has not had recent activity after being closed.
Please open a new issue if needed.
Thanks!
It's amazing that conda is now able install R packages (along with python). How nice that we can now use conda for both!
Unfortunately, I couldn't install one R package (seacarb) on CRAN , even though I was able to install another (oce) from the same CRAN archive.
Could you help solve this problem?
I've followed the procedure outlined on http://ihrke.github.io/conda.html under 'Starting up a new project'. More exactly, here is what I've done:
conda config --add channels r conda create --name Renv r source activate Renv conda skeleton cran seacarb
The first 3 commands work fine, but the final command does not. It gives the following output:
Tip: install CacheControl to cache the CRAN metadata Fetching metadata from http://cran.r-project.org/ Writing recipe for seacarb An unexpected error has occurred, please consider sending the following traceback to the conda GitHub issue tracker at:
Include the output of the command 'conda info' in your report.
File "/homel/orr/anaconda2/bin/conda-skeleton", line 5, in
sys.exit(main())
File "/homel/orr/anaconda2/lib/python2.7/site-packages/conda_build/main_skeleton.py", line 272, in main
args_func(args, p)
File "/homel/orr/anaconda2/lib/python2.7/site-packages/conda_build/main_build.py", line 468, in args_func
args.func(args, p)
File "/homel/orr/anaconda2/lib/python2.7/site-packages/conda_build/main_skeleton.py", line 290, in execute
cran.main(args, parser)
File "/homel/orr/anaconda2/lib/python2.7/site-packages/conda_build/cran.py", line 581, in main
f.write(clear_trailing_whitespace(CRAN_META.format(**d)))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 524-525: ordinal not in range(128)
As requested, here is the output of the conda info command:
$ conda info
Current conda install:
conda-build version : 1.18.2 python version : 2.7.11.final.0 requests version : 2.9.1 root environment : /homel/orr/anaconda2 (writable) default environment : /homel/orr/anaconda2/envs/Renv envs directories : /homel/orr/anaconda2/envs package cache : /homel/orr/anaconda2/pkgs channel URLs : https://conda.anaconda.org/r/linux-64/ https://conda.anaconda.org/r/noarch/ https://repo.continuum.io/pkgs/free/linux-64/ https://repo.continuum.io/pkgs/free/noarch/ https://repo.continuum.io/pkgs/pro/linux-64/ https://repo.continuum.io/pkgs/pro/noarch/ config file : /homel/orr/.condarc is foreign system : False