classification
Title: crash of METADATA file cannot be fixed by reinstall of python
Type: crash Stage: resolved
Components: Versions: Python 3.6
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: catafest, matrixise, steven.daprano, xtreak
Priority: normal Keywords:

Created on 2019-02-08 07:59 by catafest, last changed 2019-02-08 10:21 by steven.daprano. This issue is now closed.

Messages (5)
msg335060 - (view) Author: Feștilă George Cătălin (catafest) Date: 2019-02-08 07:59
The pip install module crash with this error:

Could not install packages due to an EnvironmentError: [Errno 2] No such file or
 directory: 'c:\\python364\\lib\\site-packages\\traits-4.6.0.dist-info\\METADATA
'

You are using pip version 18.1, however version 19.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm
and.

I try to fix with the reinstall the python 3.6.4 but not working.
I think the METADATA was delete by the antivirus.
The version I used is 3.6.4 but the crash can be at any python version.
msg335062 - (view) Author: Feștilă George Cătălin (catafest) Date: 2019-02-08 08:35
I delete two folders of traits
Using the pip-review --auto this is the output of traits:

  copying traits\util\tests\__init__.py -> build\lib.win-amd64-3.6\traits\util\t
ests
  running build_ext
  building 'traits.ctraits' extension
  creating build\temp.win-amd64-3.6
  creating build\temp.win-amd64-3.6\Release
  creating build\temp.win-amd64-3.6\Release\traits
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14
.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\python
364\include -Ic:\python364\include "-IC:\Program Files (x86)\Microsoft Visual St
udio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)
\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\
10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\
10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.1713
4.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-
IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tctraits
/ctraits.c /Fobuild\temp.win-amd64-3.6\Release\traits/ctraits.obj -DNDEBUG=1 -O3

  cl : Command line warning D9002 : ignoring unknown option '-O3'
  ctraits.c
  c:\python364\include\pyconfig.h(59): fatal error C1083: Cannot open include fi
le: 'io.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Commun
ity\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit s
tatus 2

  ----------------------------------------
  Failed building wheel for traits
  Running setup.py clean for traits
Failed to build scapy traits
chalice 1.7.0 has requirement attrs==17.4.0, but you'll have attrs 18.2.0 which
is incompatible.
chalice 1.7.0 has requirement click<7.0,>=6.6, but you'll have click 7.0 which i
s incompatible.
chalice 1.7.0 has requirement typing==3.6.4; python_version < "3.7", but you'll
have typing 3.6.6 which is incompatible.
msg335063 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2019-02-08 08:54
traits is not a part of stdlib and the tracker deals with issues in CPython. I think this is a third party issue or something related to your environment that can be reported to the respective project.
msg335064 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2019-02-08 09:25
hi @xtreak

because I don't have a windows vm with me, I can't reproduce this issue, but maybe this issue is related with ensurepip or just with pip.

when I have seen this issue, my first reaction was "it's not related to python", but I am not sure.
msg335070 - (view) Author: Steven D'Aprano (steven.daprano) * (Python committer) Date: 2019-02-08 10:21
That's not a crash. You are trying to install a package using pip, pip sees that it is missing the METADATA file and reports a problem. That is working correctly, not a crash.

There is no way for us to know how the metadata file got deleted. Maybe you deleted it yourself by accident? Maybe an anti-virus program moved it. Maybe you never installed it. Maybe the traits package is broken and you need to report the issue to them.

But whatever the problem is, it isn't a problem with your Python installation. You can reinstall Python a million times, that isn't going to make the traits METADATA file reappear.

If you are absolutely sure that the traits package doesn't have a METADATA file, you should report this to the maintainers of the traits package. 

The *second* problem you report is a missing io.h file. That sounds like it has been deleted. Again, we have no way of knowing how. Unless someone reproduces that error we can only guess that this is something specific to your system and not a problem with Python.

The *third* problem you report is with chalice. Again, this has nothing to do with Python, it is a third-party library and pip is doing exactly the right thing. chalice has unmet dependencies and cannot be installed, so pip is reporting the problem. You should complain to the chalice maintainers that their requirements are too strict.

I don't think any of these problems have anything to do with Python itself, so I'm going to close this issue as "Third Party". If you have additional information which shows that it is a Python problem, please tell us and we will re-open the issue.
History
Date User Action Args
2019-02-08 10:21:59steven.dapranosetstatus: open -> closed

nosy: + steven.daprano
messages: + msg335070

resolution: third party
stage: resolved
2019-02-08 09:25:39matrixisesetnosy: + matrixise
messages: + msg335064
2019-02-08 08:54:39xtreaksetnosy: + xtreak
messages: + msg335063
2019-02-08 08:35:48catafestsetmessages: + msg335062
2019-02-08 07:59:17catafestcreate