anaconda icon indicating copy to clipboard operation
anaconda copied to clipboard

ImportError on "from numpy import float32"

Open rawler opened this issue 7 years ago • 0 comments

Expected Behaviour

If import numpy as np; print(np.float32) works, so should from numpy import float32

Actual Behaviour

On from numpy import float32 I get an ImportError: "can't import float32"

Steps to Reproduce

Settings: python_interpreter set to /usr/bin/python3 (Tried with a virtualenv of python3.6, no difference) validate_imports set to True

ST3, Anaconda and OS versions

ST3: 3143 Anaconda: 2.1.24 OS: Linux Mint 18 / Ubuntu 16.04

ST3 Console Logs

MyPy is enabled but we could not import it DEBUG:root:bind: address=/home/ulrik/.local/share/anaconda/run/anaconda-2/anaconda.sock DEBUG:root:listen: backlog=5 INFO:root:Anaconda Server started in /home/ulrik/.local/share/anaconda/run/anaconda-2/anaconda.sock for PID 20459 with cache dir /home/ulrik/.cache/jedi/anaconda-2 INFO:root:Incomming connection from b'' INFO:root:Incomming connection from b'' INFO:root:client requests: lint {'errors': [{'message': '[E] ImportValidator (%s): %s', 'lineno': 3, 'level': 'E', 'underline_range': True, 'code': 801, 'raw_error': "[E] ImportValidator (801): can't import float32", 'offset': 0}], 'vid': 18, 'uid': '2016c7e8aa244e5fb45d5cd097200964', 'success': True} INFO:root:client requests: lint {'errors': [{'message': '[E] ImportValidator (%s): %s', 'lineno': 3, 'level': 'E', 'underline_range': True, 'code': 801, 'raw_error': "[E] ImportValidator (801): can't import float32", 'offset': 0}], 'vid': 18, 'uid': 'f0c26405a1a04aa494d039f39950e12a', 'success': True} INFO:root:client requests: lint {'errors': [{'message': '[E] ImportValidator (%s): %s', 'lineno': 3, 'level': 'E', 'underline_range': True, 'code': 801, 'raw_error': "[E] ImportValidator (801): can't import float32", 'offset': 0}], 'vid': 18, 'uid': '34ada31432184c51985532515d8c5663', 'success': True} INFO:root:client requests: lint {'errors': [{'message': '[E] ImportValidator (%s): %s', 'lineno': 3, 'level': 'E', 'underline_range': True, 'code': 801, 'raw_error': "[E] ImportValidator (801): can't import float32", 'offset': 0}], 'vid': 18, 'uid': '3c617259d3c04c5893f8585c575f3b48', 'success': True} INFO:root:client requests: lint {'errors': [{'message': '[E] ImportValidator (%s): %s', 'lineno': 3, 'level': 'E', 'underline_range': True, 'code': 801, 'raw_error': "[E] ImportValidator (801): can't import float32", 'offset': 0}], 'vid': 18, 'uid': 'b2241e85b9524daab2ed4bf102737c66', 'success': True} ulrik@ulrik-thinkpad ~> INFO:root:process 20459 does not exists stopping server... INFO:root:Closing the socket, server will be shutdown now...

Anaconda's JsonServer Logs

2017-11-03 14:30:10,457: DEBUG : bind: address=/home/ulrik/.local/share/anaconda/run/anaconda-2/anaconda.sock 2017-11-03 14:30:10,457: DEBUG : listen: backlog=5 2017-11-03 14:30:10,457: INFO : Anaconda Server started in /home/ulrik/.local/share/anaconda/run/anaconda-2/anaconda.sock for PID 20459 with cache dir /home/ulrik/.cache/jedi/anaconda-2 2017-11-03 14:30:10,465: INFO : Incomming connection from b'' 2017-11-03 14:30:10,466: INFO : Incomming connection from b'' 2017-11-03 14:30:10,469: INFO : client requests: lint 2017-11-03 14:30:12,601: INFO : client requests: lint 2017-11-03 14:30:12,642: INFO : client requests: lint 2017-11-03 14:30:13,325: INFO : client requests: lint 2017-11-03 14:30:22,020: INFO : client requests: lint 2017-11-03 14:30:23,484: INFO : process 20459 does not exists stopping server... 2017-11-03 14:30:24,486: INFO : Closing the socket, server will be shutdown now...

rawler avatar Nov 03 '17 13:11 rawler