Unable to install python module: PyCharm error: "byte compilation disabled, skipped"

I just installed PyCharm 5 for the first time and tried to get everything working. I have a simple python script that is trying to import pandas (import pandas as pd). It fails because pandas is not installed ... So I go to install it and then get the error message (copied below).

I tried looking for some "byte compilation" settings in the settings or help, but to no avail. I have already tried the workarounds suggested here, including changing the default project editor to Python 2.7, but this did not help ( https://github.com/spacy-io/spaCy/issues/114 ).

What should I do?

================= Error below ================= Executed command:" /var/folders/kf/nd7950995gn25k6_xsh3tv6c0000gn/T/tmpgYwltUpycharm-management/pip-7.1.0/setup.py install Error occurred: 40:357: execution error: warning: build_py: byte-compiling is disabled, skipping. Command Output: 40:357: execution error: warning: build_py: byte-compiling is disabled, skipping. warning: install_lib: byte-compiling is disabled, skipping. error: byte-compiling is disabled. (1) 
+7
python pycharm
source share
2 answers

There are two parts that are very important:

  • Changing the default project interpreter to Python 2.7 *
  • Make sure your CURRENT PROJECT is installed in the same way as Python 2.7. This is not so simple and does not happen automatically even after changing the default value. It also did not work when I initially changed my current project interpreter to 2.7. It only worked after I removed the Python 2.6 interpreter, which it actually adjusted to version 2.7.

* (maybe it could work in version 3.0 ... this, of course, did not help me use 2.6)

+8
source share

For anyone with the same problem, it took me a while to find a solution in the new PyCharm 5 installation.

The problem is that you need to change the default interpreter that PyCharm 5 brings (default is 2.6). It is different from your python version system and IDE.

Windows or Linux File -> Settings -> Project Interpreter

Mac PyCharm β†’ Settings β†’ Project Interpreter

Select python -version and then you can install all the modules you need with

 pip install ModuleName 

I recommend also adding all the PATH

Settings β†’ Tools β†’ Terminal β†’ Shell Path : echo $ PATH

+18
source share

All Articles