我有一个安装了 Python 3.7.5 的 Anaconda(最新版本)环境,这是我迄今为止唯一的环境。现在我想安装glumpy,它没有在 anaconda 云和频道中列出,但它可以通过 GitHub 克隆,也可以通过pip
.
我什至有一个预制的轮子,仍然是最新版本。
现在,由于我只使用 conda 环境而没有安装其他 Python,我非常希望它能够在那里工作,而不会引入一些长期的错误或混乱。做这个的最好方式是什么?AFAIK,pip
永远不应该在 conda 环境中使用。
提前致谢,我可以在早上为您提供控制台读数等。
贾格
编辑3:
我创建了另一个环境来尝试这个,我安装了 m2-patch,但它仍然不起作用。一切正常,直到:
...
Applying patch: 'C:\\Users\\TheBeast\\AppData\\Local\\Temp\\tmpnv0lrqd3conda_skeleton_glumpy-1.1.0.tar.gz\\pypi-distutils.patch'
Trying to apply patch as-is
INFO:conda_build.source:Trying to apply patch as-is
INFO conda_build.source:apply_patch(596): Trying to apply patch as-is
(Stripping trailing CRs from patch; use --binary to disable.)
patching file core.py
Hunk #1 succeeded at 167 with fuzz 2 (offset 1 line).
Traceback (most recent call last):
File "setup.py", line 9, in <module>
from Cython.Distutils import build_ext
ModuleNotFoundError: No module named 'Cython'
$PYTHONPATH = C:\Users\TheBeast\AppData\Local\Temp\tmpnv0lrqd3conda_skeleton_glumpy-1.1.0.tar.gz\glumpy-1.1.0
Leaving build/test directories:
Work:
E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\conda-bld\skeleton_1579203255690\work
Test:
E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\conda-bld\skeleton_1579203255690\test_tmp
Leaving build/test environments:
Test:
source activate E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\conda-bld\skeleton_1579203255690\_test_env
Build:
source activate E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\conda-bld\skeleton_1579203255690\_build_env
Error: command failed: E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\conda-bld\skeleton_1579203255690\_h_env\python.exe setup.py install
我确实安装了cython。那么有什么想法吗?
编辑: 哦,我忘了提到我已经尝试过了
conda skeleton pypi glumpy
但它给了我这个错误信息。简单地通过 conda 安装补丁并没有帮助。
Warning, the following versions were found for glumpy
0.2.0
0.2.1
1.0
1.0.1
1.0.2
1.0.3
1.0.4
1.0.5
1.0.6
1.1.0
Using 1.1.0
Use --version to specify a different version.
Using url https://files.pythonhosted.org/packages/1e/d9/cbc85887ec54406ffe991d42de11445e5dacd052748cf376be6403b40d61/glumpy-1.1.0.tar.gz (492 KB) for glumpy.
Downloading glumpy
PyPI URL: https://files.pythonhosted.org/packages/1e/d9/cbc85887ec54406ffe991d42de11445e5dacd052748cf376be6403b40d61/glumpy-1.1.0.tar.gz
Using cached download
Unpacking glumpy...
done
working in C:\Users\User\AppData\Local\Temp\tmpn1zgjyc_conda_skeleton_glumpy-1.1.0.tar.gz
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
## Package Plan ##
environment location: E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\conda-bld\skeleton_1578698077181\_h_env
The following NEW packages will be INSTALLED:
blas: 1.0-mkl
ca-certificates: 2019.11.27-0
certifi: 2019.11.28-py37_0
icc_rt: 2019.0.0-h0cc432a_1
intel-openmp: 2019.4-245
mkl: 2019.4-245
mkl-service: 2.3.0-py37hb782905_0
mkl_fft: 1.0.15-py37h14836fe_0
mkl_random: 1.1.0-py37h675688f_0
numpy: 1.17.4-py37h4320e6b_0
numpy-base: 1.17.4-py37hc3f5095_0
openssl: 1.1.1d-he774522_3
pip: 19.3.1-py37_0
python: 3.7.6-h60c2a47_2
pyyaml: 5.2-py37he774522_0
setuptools: 44.0.0-py37_0
six: 1.13.0-py37_0
sqlite: 3.30.1-he774522_0
vc: 14.1-h0510ff6_4
vs2015_runtime: 14.16.27012-hf0eaf9b_1
wheel: 0.33.6-py37_0
wincertstore: 0.2-py37_0
yaml: 0.1.7-hc54c509_2
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Applying patch: 'C:\\Users\\User\\AppData\\Local\\Temp\\tmpn1zgjyc_conda_skeleton_glumpy-1.1.0.tar.gz\\pypi-distutils.patch'
Leaving build/test directories:
Work:
E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\conda-bld\skeleton_1578698077181\work
Test:
E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\conda-bld\skeleton_1578698077181\test_tmp
Leaving build/test environments:
Test:
source activate E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\conda-bld\skeleton_1578698077181\_test_env
Build:
source activate E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\conda-bld\skeleton_1578698077181\_build_env
Error:
Cannot use 'git' (not a git repo and/or patch) and did not find 'patch' in: E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\conda-bld\skeleton_1578698077181\_build_env\Scripts;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\conda-bld\skeleton_1578698077181\_build_env\Library\mingw-w64\bin;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\conda-bld\skeleton_1578698077181\_build_env\Library\usr\bin;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\conda-bld\skeleton_1578698077181\_build_env\Library\bin;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\Scripts;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\Library\mingw-w64\bin;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\Library\usr\bin;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\Library\bin;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\pywin32_system32;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\pywin32_system32;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\Library\mingw-w64\bin;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\Library\usr\bin;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\Library\bin;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\Scripts;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\bin;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\Library\mingw-w64\bin;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\Library\usr\bin;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\Library\bin;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\Scripts;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\bin;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\pywin32_system32;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\Library\mingw-w64\bin;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\Library\usr\bin;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\Library\bin;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\Scripts;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\bin;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\condabin;E:\User\Programme\Multimedia\ImageMagick-7.0.9-Q16;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;E:\User\Programme\Utility_Misc\putty;E:\Allgemein\Allgemein\Programme\Sicherheit\ATI.ACE\Core-Static;E:\Allgemein\Allgemein\Programme\Programmieren\cygwin64\bin;C:\Programme\Java\jre1.8.0_144\bin;C:\WINDOWS\System32\OpenSSH;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda\Scripts\jupyter.exe;E:\Allgemein\Allgemein\Programme\Programmieren\Git LFS;E:\Allgemein\Allgemein\Programme\Programmieren\CMake\bin;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda\Library\mingw-w64\bin;E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda\Library\bin;C:\Program Files (x86)\Wolfram Research\WolframScript;E:\Allgemein\Allgemein\Programme\Programmieren\Git\cmd;C:\Users\User\AppData\Local\Microsoft\WindowsApps;C:\Users\User\AppData\Local\GitHubDesktop\bin;C:\Users\User\AppData\Local\atom\bin;E:\User\Programme\Development\PyCharm2019.2\bin;.;C:\Users\User\spicetify-cli
You can install 'patch' using apt-get, yum (Linux), Xcode (MacOSX),
or conda, m2-patch (Windows),
正如评论中指出的那样, usingconda skeleton pypi --extra-specs patch glumpy
可能会有所帮助,但随后会引发此异常,即找不到patch
:
Using url https://files.pythonhosted.org/packages/1e/d9/cbc85887ec54406ffe991d42de11445e5dacd052748cf376be6403b40d61/glumpy-1.1.0.tar.gz (492 KB) for glumpy.
Downloading glumpy
PyPI URL: https://files.pythonhosted.org/packages/1e/d9/cbc85887ec54406ffe991d42de11445e5dacd052748cf376be6403b40d61/glumpy-1.1.0.tar.gz
Using cached download
Unpacking glumpy...
done
working in C:\Users\User\AppData\Local\Temp\tmp0dakggadconda_skeleton_glumpy-1.1.0.tar.gz
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed
Leaving build/test directories:
Work:
E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\conda-bld\skeleton_1578745194043\work
Test:
E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\conda-bld\skeleton_1578745194043\test_tmp
Leaving build/test environments:
Test:
source activate E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\conda-bld\skeleton_1578745194043\_test_env
Build:
source activate E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\conda-bld\skeleton_1578745194043\_build_env
Traceback (most recent call last):
File "E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\conda_build\environ.py", line 757, in get_install_actions
actions = install_actions(prefix, index, specs, force=True)
File "E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
return f(*args, **kwds)
File "E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\conda\plan.py", line 474, in install_actions
txn = solver.solve_for_transaction(prune=prune, ignore_pinned=not pinned)
File "E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\conda\core\solve.py", line 117, in solve_for_transaction
should_retry_solve)
File "E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\conda\core\solve.py", line 158, in solve_for_diff
force_remove, should_retry_solve)
File "E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\conda\core\solve.py", line 275, in solve_final_state
ssc = self._add_specs(ssc)
File "E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\conda\core\solve.py", line 555, in _add_specs
explicit_pool = ssc.r._get_package_pool(self.specs_to_add)
File "E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\conda\resolve.py", line 531, in _get_package_pool
pool = self.get_reduced_index(specs)
File "E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
return f(*args, **kwds)
File "E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\conda\resolve.py", line 552, in get_reduced_index
explicit_specs, features = self.verify_specs(explicit_specs)
File "E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\conda\resolve.py", line 288, in verify_specs
raise ResolvePackageNotFound(bad_deps)
conda.exceptions.ResolvePackageNotFound:
- patch
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\Scripts\conda-skeleton-script.py", line 10, in <module>
sys.exit(main())
File "E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\conda_build\cli\main_skeleton.py", line 65, in main
return execute(sys.argv[1:])
File "E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\conda_build\cli\main_skeleton.py", line 61, in execute
version=args.version, config=config)
File "E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\conda_build\api.py", line 290, in skeletonize
recursive=recursive, config=config, **kwargs)
File "E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\conda_build\skeletons\pypi.py", line 319, in skeletonize
setup_options=setup_options)
File "E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\conda_build\skeletons\pypi.py", line 726, in get_package_metadata
config=config)
File "E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\conda_build\skeletons\pypi.py", line 1127, in get_pkginfo
setup_options=setup_options)
File "E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\conda_build\skeletons\pypi.py", line 1164, in run_setuppy
subdir=config.host_subdir, clear_cache=False, config=config)
File "E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\conda_build\environ.py", line 850, in create_env
channel_urls=tuple(config.channel_urls))
File "E:\Allgemein\Allgemein\Programme\Programmieren\Anaconda3\lib\site-packages\conda_build\environ.py", line 759, in get_install_actions
raise DependencyNeedsBuildingError(exc, subdir=subdir)
conda_build.exceptions.DependencyNeedsBuildingError: Unsatisfiable dependencies for platform win-64: {'patch'}