Illegal instruction (core dumped) after running import tensorflow

I would use older version. Looks like your CPU does not support AVX instructions. Quoting from their Release Page Breaking Changes Prebuilt binaries are now built against CUDA 9.0 and cuDNN 7. Prebuilt binaries will use AVX instructions. This may break TF on older CPUs. You have atleast two options: Use tensorflow 1.5 or older … Read more

Exclude folder from mypy checking

The issue is that VS Code is invoking mypy file by file. And mypy doesn’t use the exclude option when invoked on a single file. The workaround is using python.linting.ignorePatterns in the settings.json. “python.linting.ignorePatterns”: [ “venv/**/*.py” ] More info about the behaviour of exclude: Note that this flag only affects recursive discovery, that is, when … Read more

TKinter in a Virtualenv

Set the environment variable TCL_LIBRARY in your activate script. On Windows (Python 2.7 with Tcl 8.5), just add this line to Scripts\activate.bat: set “TCL_LIBRARY=C:\Python27\tcl\tcl8.5” @Jasper van den Bosch’s edit: On Ubuntu, the modification to the script activate is the following: TK_LIBRARY=/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/site-packages/PIL:/usr/lib TKPATH=/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/site-packages/PIL:/usr/lib TCL_LIBRARY=/usr/lib export TCL_LIBRARY TK_LIBRARY TKPATH The reference of this can be found on … Read more

python: what’s the difference between pythonbrew and virtualenv?

Pythonbrew is akin to Ruby’s rvm: It’s a shell function that allows you to: Build one or more complete self-contained versions of Python, each stored locally under your home directory. You can build multiple versions of Python this way. Switch between the versions of Python easily. The Pythons you build are completely isolated from each … Read more

Python packages not installing in virtualenv using pip

The problem here is that you’re using sudo when you shouldn’t be. And that’s causing pip to try to install into /usr/local/lib instead of ~/glenv/lib. (And, because you used sudo, it’s successfully doing so, but that doesn’t help you, because you’re not allowing system site-packages in your venv.) There are multiple reasons sudo pip could … Read more

Import error cannot import name execute_manager in windows environment

execute_manager deprecated in Django 1.4 as part of the project layout refactor and was removed in 1.6 per the deprecation timeline: https://docs.djangoproject.com/en/1.4/internals/deprecation/#id3 To fix this error you should either install a compatible version of Django for the project or update the manage.py to new style which does not use execute_manager: https://docs.djangoproject.com/en/stable/releases/1.4/#updated-default-project-layout-and-manage-py Most likely if your … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)