Meine tox.ini Datei sieht wie folgt auf Windowstox nicht pyYaml auf Windows
[tox]
envlist = cpy27,dpy27
skip_missing_interpreters = True
[testenv]
basepython =
cpy27: C:\Python27\python.exe
dpy27: D:\Python27\python.exe
deps =
pytest
commands = py.test tests
Aber installieren, wenn ich „tox“ von Eingabeaufforderung zu tun, ich bin diesen Fehler zu sehen. Warum ist das? Ich sehe keinen Fehler, wenn ich Python laufen auf der Kommandozeile installieren setup.py
Installing collected packages: coverage, pytest-cov, requests, psutil, pytz, enum, argh, pathtools, PyYAML, watchdog, monit
Running setup.py install for PyYAML: started
Running setup.py install for PyYAML: finished with status 'error'
Complete output from command d:\repos\foo\.tox\dpy27\scripts\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\foo\\appdata\\local\\temp\\pip-build-bbx8kz\\PyYAML\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\vikone\appdata\local\temp\pip-zyvbbh-record\install-record.txt --single-version-externally-managed --compile --install-headers d:\repos\foo\.tox\dpy27\include\site\python2.7\PyYAML:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\yaml
copying lib\yaml\composer.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\constructor.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\cyaml.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\dumper.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\emitter.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\error.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\events.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\loader.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\nodes.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\parser.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\reader.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\representer.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\resolver.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\scanner.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\serializer.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\tokens.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\__init__.py -> build\lib.win-amd64-2.7\yaml
running build_ext
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
checking if libyaml is compilable
error: [Error 2] The system cannot find the file specified
UPDATE
Ich habe bemerkt, dass, wenn ich manuell die virtualenv aktivieren und tun „pyyaml installieren pip "Es schlägt mit demselben Fehler fehl. Aber wenn ich in der regulären Eingabeaufforderung, nicht virtualenv, und den gleichen Befehl ausführen, installiert es gut.
Das scheint also ein Problem mit Pyyaml und virtualenv, aber nicht toxisch an sich. Auch wenn ich mit dem Befehl easy_install in tox.ini versuche, funktioniert es ohne Probleme.
[testenv]
install_command = easy_install {opts} {packages}
Ändert sich etwas mit 'passv = *' in Ihrer 'tox.ini' unter' [testtenv] '? –
das hat nicht funktioniert – user330612