Error while constructing custom Anaconda installer

2019-08-26 00:20发布

问题:

I am creating a custom Anaconda installer on Windows 10 64bit. I have created construct.yaml like :

name : TensorFlowEnv
version : 1.0.0
specs :
   - numpy
channels :
   - https://conda.anaconda.org/anaconda/win-64

After running the construcor command , I am getting the following error

platform: win-64
Collecting package metadata: done
Solving environment: done
Checking for duplicate files ...

Checking for 'C:\Users\Equip\Anaconda3\envs\TensorFlowEnv\NSIS\makensis.exe'
NSIS version: v3.01
Traceback (most recent call last):
  File "C:\Users\Equip\Anaconda3\envs\TensorFlowEnv\Scripts\constructor-script.py", line 10, in <module>
    sys.exit(main())

  File "C:\Users\Equip\Anaconda3\envs\TensorFlowEnv\lib\site-packages\constructor\main.py", line 221, in main
    dry_run=opts.dry_run)
  File "C:\Users\Equip\Anaconda3\envs\TensorFlowEnv\lib\site-packages\constructor\main.py", line 128, in main_build
    create(info, verbose=verbose)
File "C:\Users\Equip\Anaconda3\envs\TensorFlowEnv\lib\site-packages\constructor\winexe.py", line 218, in create
    preconda_write_files(info, tmp_dir)
  File "C:\Users\Equip\Anaconda3\envs\TensorFlowEnv\lib\site-packages\constructor\preconda.py", line 135, in write_files
    write_index_cache(info, dst_dir)
 File "C:\Users\Equip\Anaconda3\envs\TensorFlowEnv\lib\site-packages\constructor\preconda.py", line 40, in write_index_cache
    write_repodata(cache_dir, url)
  File "C:\Users\Equip\Anaconda3\envs\TensorFlowEnv\lib\site-packages\constructor\conda_interface.py", line 61, in write_repodata
    fh.write(raw_repodata_str)
TypeError: write() argument must be str, not None

The error is :

TypeError: write() argument must be str, not None

Any help would be appreciated.