New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip on windows #1840

Closed
OCherniaiev opened this Issue May 26, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@OCherniaiev

OCherniaiev commented May 26, 2014

Prerequisites:
Windows
python 2.7
setuptools 3.6
easy_install
pip

Problem:
we have a requirements file that contains "pyinstaller" package dependency. I suppose that it somehow depends on cryptography and it in its turn somehow depends on cffi package and that's why it tries to install it as well. For now we specify this depency in a following way:

pyinstaller==2.1.1dev-89e99dd # from requirements file.

Next we try to install our pack of requirements with

pip -f {our additional private repository} -U -egg -r {requirements file name}

From the build log screenshot attached you can see the following string(build_log attachment):

[12:59:39]: [Step 7/15] Installed c:\users\administrator\envs\python27-32bit\lib\site-packages\cryptography-0.3-py2.7-win32.egg
[12:59:39]: [Step 7/15]
[12:59:39]: [Step 7/15] error: c:\buildagent\temp\buildtmp\easy_install-snsbak\cryptography-0.3\cffi-0.8.2-py2.7-win32.egg_cffi_backend.pyd: Access is denied

I've done a few of investigation and attached a screenshot of related file activity with a highlighted important items (file_activity_list attachment). It seems that python cannod delete this _cffi_backend.pyd file. A few more investigation revealed that the file creation mode allows to delete this file(file_open_result attachment). From the event properties(event_properties attachment) I see that all related modules appear as if they are loaded using LoadLibray windows api, that's how it supposed to be done with python C extensions if we want to use this code. But it appears to me that someone forgot to unload all these modules before trying to delete them and that's why the file cannot be deleted. Please refer to _cffi_backend_loading attachment - it proves _cffi_backend.pyd is being loaded as a library(WinDbg screen). And the very next screenshot is the state of pip install command when WinDbg broke on module load - _break_python_screen attachment. Yet I pointed out the same problem if I just parse this requirements file with pkg_tools and specify install_requires setup's argument with these requirements - setup develop fails with the same result. As to me this problem more relates to easy_install/setuptools core. And yet to mention - without '--egg' argument the problem doesn't reproduce.

file_activity_list
event_properties
file_open_result

build_log
_cffi_backend_loading
_break_python_screen

@OCherniaiev OCherniaiev reopened this May 28, 2014

@OCherniaiev

This comment has been minimized.

Show comment
Hide comment
@OCherniaiev

OCherniaiev Jun 3, 2014

Has anybody ever had a look over this issue?

OCherniaiev commented Jun 3, 2014

Has anybody ever had a look over this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment