PyCharm is locking .egg file ("[Error 5] Access is denied" when running "python install" as an external tool).


Hi, I am trying to make some changes in a Python module with Cython code and to see my changes I have to compile the module every time with "python install". I have the build/compilation process working from an external console, but when I start PyCharm it is completely blocking the .egg file of the module I am trying to work with - I cannot compile it neither from the console, nor using the "external tool" option in PyCharm.


After closing PyCharm everything works again in a console.


The PyCharm project has the conda environment set up as an interpreter and I am using the same environment when compiling the module which might be causing problems here. Tool settings below:

Program: C:\ProgramData\Anaconda3\envs\<env name>\python.exe

Parameters: install

Working directory: <path to dir where sits>


Is there any chance to prevent PyCharm from locking this .egg file? It looks like it might be constantly scanning the environment directory for modules/changes or processing the file in some other way.


Thanks for looking into this!


Edit: system details: Win 10 64 bits, PyCharm Professional 2017.2.4, Python 2.7.14

Comment actions Permalink

I encounter this error regularly with Intellij IDEA Ultra using the python plugin. It happens when I'm developing in two different projects where one uses the egg from the other. When I update the project and reinstall I get "error: c:\[...].egg: The process cannot access the file because it is being used by another process". It goes away if I just wait a couple minutes but it's ridiculously annoying.

Comment actions Permalink


I reported an issue on YouTrack:

Feel free to vote for it and leave comments.


Andrey Vlasovskikh
Comment actions Permalink

Mdziedzic, Jonathan Marzinke, could you please share your example projects in PY-28687?


Please sign in to leave a comment.