Anaconda Python Conda pipbuild失败,Windows错误找不到文件
我最近切换到Anaconda Python发行版,我正在尝试掌握一些诀窍。我想安装,因为还没有康达配方,我尝试了Anaconda Python Conda pipbuild失败,Windows错误找不到文件,python,pip,anaconda,conda,Python,Pip,Anaconda,Conda,我最近切换到Anaconda Python发行版,我正在尝试掌握一些诀窍。我想安装,因为还没有康达配方,我尝试了 conda pipbuild layered-yaml-attrdict-config 这导致了以下输出(我删除了我的系统路径中不相关的条目): 因此,它可能在解决包规范时发现了包的某种问题:。在流的末尾还剩下69个未解析的字节。然后它做了一个补丁,显然失败了。然后它尝试执行pip安装,但在pipbuild环境中再次找不到bin/pip目录 它是否应该在C:\Anaconda\en
conda pipbuild layered-yaml-attrdict-config
这导致了以下输出(我删除了我的系统路径中不相关的条目):
因此,它可能在解决包规范时发现了包的某种问题:。在流的末尾还剩下69个未解析的字节。然后它做了一个补丁,显然失败了。然后它尝试执行pip安装
,但在pipbuild环境中再次找不到bin/pip目录
它是否应该在C:\Anaconda\envs\\u pipbuild\uscripts\pip.exe
中查找pip?因为这确实存在
如果这是一个bug,请在此处报告:。我会等待反馈,然后再做
任何帮助都会很好 在Python3上有一个相同问题的修复程序。它涉及到在Python标准库中编辑distutils\cygwingcompiler.py文件
我认为您可以在Python2中做同样的事情,尽管它可能需要一些翻译,因为Python2版本的cygwinccompiler使用os.popen
而不是子进程。检查输出。假设您可以只使用子流程。检查文件中相关位置的输出(['gcc','-dumpmachine',shell=True)
,它将解决问题 我在尝试使用“conda pipbuild package name”构建PyPI包时遇到了类似的问题,但我无法在Windows 7(x64)上运行它。我发现的一个有用的解决方法(如果您想将带有“conda install package name”的软件包安装到特定的conda环境中)如下所示:
- 使用“pip安装包名称”安装PyPI包
- 使用“binstar Upload%conda_install_path%/pkgs/package-name-ver-py27.tar.bz2”将包上载到您的binstar帐户
- 使用“conda Install-c package name-p%path to conda env%”将包安装到特定的conda env中
C:\Anaconda>conda install layered-yaml-attrdict-config
Fetching package metadata: ..
Error: No packages found matching: layered-yaml-attrdict-config
C:\Anaconda>conda pipbuild layered-yaml-attrdict-config
Fetching package metadata: ..
Creating standard recipe for layered-yaml-attrdict-config-14.06.7
Using url https://pypi.python.org/packages/source/l/layered-yaml-attrdict-config
/layered-yaml-attrdict-config-14.06.7.tar.gz (6147) for layered-yaml-attrdict-co
nfig.
Downloading layered-yaml-attrdict-config (use --no-download to skip this step)
Unpacking layered-yaml-attrdict-config...
done
working in c:\users\bnables\appdata\local\temp\1\tmp07kkdbconda_skeleton_layered
-yaml-attrdict-config
Fetching package metadata: ...
Solving package specifications: .
The following packages will be downloaded:
package | build
---------------------------|-----------------
python-2.7.7 | 2 17.1 MB
The following packages will be linked:
package | build
---------------------------|-----------------
python-2.7.7 | 2 hard-link
pyyaml-3.11 | py27_0 hard-link
setuptools-3.6 | py27_0 hard-link
Fetching packages ...
python-2.7.7-2 100% |###############################| Time: 0:00:08 2.00 MB/s
Extracting packages ...
[ COMPLETE ] |#################################################| 100%
Linking packages ...
[ COMPLETE ] |#################################################| 100%
Applying patch: u'c:\\users\\bnables\\appdata\\local\\temp\\1\\tmp07kkdbconda_sk
eleton_layered-yaml-attrdict-config\\pypi-distutils.patch'
Error:
Did not find 'patch' in: C:\Anaconda\envs\_build\Scripts;C:\Anaconda\Scripts
;C:\Anaconda;C:\Anaconda\Scripts
You can install 'patch' using apt-get, yum (Linux), Xcode (MacOSX),
or conda, cygwin (Windows),
conda create -n _pipbuild_ --yes python pip
Fetching package metadata: ..
Solving package specifications: .
Package plan for installation in environment C:\Anaconda\envs\_pipbuild_:
The following packages will be linked:
package | build
---------------------------|-----------------
pip-1.5.6 | py27_0 hard-link
python-2.7.7 | 2 hard-link
setuptools-3.6 | py27_0 hard-link
WARNING: the process C:\Anaconda\python.exe C:\Anaconda\Scripts\conda-script.py
pipbuild layered-yaml-attrdict-config (7712) is running
WARNING: the process C:\Anaconda\Scripts\conda-pipbuild.exe layered-yaml-attrdic
t-config (4596) is running
WARNING: the process C:\Anaconda\python.exe C:\Anaconda\Scripts\conda-pipbuild-s
cript.py layered-yaml-attrdict-config (7208) is running
WARNING: Continuing installation while the above processes are running is
not recommended. Please, close all Anaconda programs before installing or
updating things with conda.
Extracting packages ...
[ COMPLETE ] |#################################################| 100%
Linking packages ...
[ COMPLETE ] |#################################################| 100%
#
# To activate this environment, use:
# > activate _pipbuild_
#
C:\Anaconda\envs\_pipbuild_/bin/pip install layered-yaml-attrdict-config==14.06.
7
Traceback (most recent call last):
File "C:\Anaconda\Scripts\conda-pipbuild-script.py", line 4, in <module>
sys.exit(main())
File "C:\Anaconda\lib\site-packages\conda_build\main_pipbuild.py", line 76, in
main
args.func(args, p)
File "C:\Anaconda\lib\site-packages\conda_build\main_pipbuild.py", line 347, i
n execute
build_package(package, version)
File "C:\Anaconda\lib\site-packages\conda_build\main_pipbuild.py", line 300, i
n build_package
directory, dependencies = make_recipe(package, version)
File "C:\Anaconda\lib\site-packages\conda_build\main_pipbuild.py", line 244, i
n make_recipe
depends = get_all_dependencies(package, version)
File "C:\Anaconda\lib\site-packages\conda_build\main_pipbuild.py", line 214, i
n get_all_dependencies
ret = subprocess.Popen(cmd2.split()).wait()
File "C:\Anaconda\lib\subprocess.py", line 710, in __init__
errread, errwrite)
File "C:\Anaconda\lib\subprocess.py", line 958, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
C:\Anaconda>
C:\Anaconda>conda pipbuild layered-yaml-attrdict-config
Fetching package metadata: ..
Creating standard recipe for layered-yaml-attrdict-config-14.06.7
Using url https://pypi.python.org/packages/source/l/layered-yaml-attrdict-config/layered-yaml-attrdict-config-14.06.7.ta
r.gz (6147) for layered-yaml-attrdict-config.
Downloading layered-yaml-attrdict-config (use --no-download to skip this step)
Unpacking layered-yaml-attrdict-config...
done
working in c:\users\bnables\appdata\local\temp\1\tmp7cuibgconda_skeleton_layered-yaml-attrdict-config
Fetching package metadata: ...
Solving package specifications: .69 unparsed bytes left at the end of stream
file 1/1: core.py
hunk no.1 doesn't match source file at line 165
expected:
actual : raise SystemExit, "error: " + str(msg)
source file is different - core.py
Applying patch: u'c:\\users\\bnables\\appdata\\local\\temp\\1\\tmp7cuibgconda_skeleton_layered-yaml-attrdict-config\\pyp
i-distutils.patch'
Traceback (most recent call last):
File "C:\Anaconda\Scripts\conda-skeleton-script.py", line 4, in <module>
sys.exit(main())
File "C:\Anaconda\lib\site-packages\conda_build\main_skeleton.py", line 124, in main
args.func(args, p)
File "C:\Anaconda\lib\site-packages\conda_build\main_skeleton.py", line 135, in execute
pypi.main(args, parser)
File "C:\Anaconda\lib\site-packages\conda_build\pypi.py", line 314, in main
run_setuppy(src_dir, tempdir, args)
File "C:\Anaconda\lib\site-packages\conda_build\pypi.py", line 485, in run_setuppy
apply_patch(join(stdlib_dir, 'distutils'), patch)
File "C:\Anaconda\lib\site-packages\conda_build\source.py", line 202, in apply_patch
check_call([patch, '-p0', '-i', path], cwd=src_dir)
File "C:\Anaconda\lib\subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '[u'C:\\Anaconda\\Scripts\\patch.bat', u'-p0', u'-i', u'c:\\users\\bnables\\appda
ta\\local\\temp\\1\\tmp7cuibgconda_skeleton_layered-yaml-attrdict-config\\pypi-distutils.patch']' returned non-zero exit
status -1
conda create -n _pipbuild_ --yes python pip
Error: prefix already exists: C:\Anaconda\envs\_pipbuild_
C:\Anaconda\envs\_pipbuild_/bin/pip install layered-yaml-attrdict-config==14.06.7
Traceback (most recent call last):
File "C:\Anaconda\Scripts\conda-pipbuild-script.py", line 4, in <module>
sys.exit(main())
File "C:\Anaconda\lib\site-packages\conda_build\main_pipbuild.py", line 76, in main
args.func(args, p)
File "C:\Anaconda\lib\site-packages\conda_build\main_pipbuild.py", line 347, in execute
build_package(package, version)
File "C:\Anaconda\lib\site-packages\conda_build\main_pipbuild.py", line 300, in build_package
directory, dependencies = make_recipe(package, version)
File "C:\Anaconda\lib\site-packages\conda_build\main_pipbuild.py", line 244, in make_recipe
depends = get_all_dependencies(package, version)
File "C:\Anaconda\lib\site-packages\conda_build\main_pipbuild.py", line 214, in get_all_dependencies
ret = subprocess.Popen(cmd2.split()).wait()
File "C:\Anaconda\lib\subprocess.py", line 710, in __init__
errread, errwrite)
File "C:\Anaconda\lib\subprocess.py", line 958, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified