cjdrake / boolexpr

Boolean Expressions
Apache License 2.0
20 stars 6 forks source link

I cannot install the library for python 3.7 #37

Open Prometheus1994 opened 5 years ago

Prometheus1994 commented 5 years ago

After I published this issue 3 days ago #36. And I got a reply which I figure it means that I should try install it for python 3 instead. I uninstalled Python 2 and reinstalled Python 3 and I ran the command again with Anaconda Prompt (Because it doesn't work in Command Prompt) and the problem remains unsolved. This is what I get:

(base) C:\Users\Me>pip install boolexpr
Collecting boolexpr
  Using cached https://files.pythonhosted.org/packages/f3/f4/923dd0954228f85ed219da453bbedfdae21ecab4f0683d164fb50e1b4165/boolexpr-2.4.tar.gz
Requirement already satisfied: cffi>=1.5.0 in c:\users\me\anaconda3\lib\site-packages (from boolexpr) (1.11.5)
Requirement already satisfied: pycparser in c:\users\me\anaconda3\lib\site-packages (from cffi>=1.5.0->boolexpr) (2.19)
Building wheels for collected packages: boolexpr
  Running setup.py bdist_wheel for boolexpr ... error
  Complete output from command C:\Users\Me\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Me\\AppData\\Local\\Temp\\pip-install-d7w3dks_\\boolexpr\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\Me\AppData\Local\Temp\pip-wheel-72a29tc8 --python-tag cp37:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.7
  creating build\lib.win-amd64-3.7\boolexpr
  copying boolexpr\misc.py -> build\lib.win-amd64-3.7\boolexpr
  copying boolexpr\util.py -> build\lib.win-amd64-3.7\boolexpr
  copying boolexpr\wrap.py -> build\lib.win-amd64-3.7\boolexpr
  copying boolexpr\__init__.py -> build\lib.win-amd64-3.7\boolexpr
  running build_ext
  building 'boolexpr._boolexpr' extension
  error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

  ----------------------------------------
  Failed building wheel for boolexpr
  Running setup.py clean for boolexpr
Failed to build boolexpr
Installing collected packages: boolexpr
  Running setup.py install for boolexpr ... error
    Complete output from command C:\Users\Me\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Me\\AppData\\Local\\Temp\\pip-install-d7w3dks_\\boolexpr\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Me\AppData\Local\Temp\pip-record-eh9ko1pa\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.7
    creating build\lib.win-amd64-3.7\boolexpr
    copying boolexpr\misc.py -> build\lib.win-amd64-3.7\boolexpr
    copying boolexpr\util.py -> build\lib.win-amd64-3.7\boolexpr
    copying boolexpr\wrap.py -> build\lib.win-amd64-3.7\boolexpr
    copying boolexpr\__init__.py -> build\lib.win-amd64-3.7\boolexpr
    running build_ext
    building 'boolexpr._boolexpr' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

    ----------------------------------------
Command "C:\Users\Me\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Me\\AppData\\Local\\Temp\\pip-install-d7w3dks_\\boolexpr\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Me\AppData\Local\Temp\pip-record-eh9ko1pa\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Me\AppData\Local\Temp\pip-install-d7w3dks_\boolexpr\
cjdrake commented 5 years ago

I'm not familiar with Anaconda, but the problem here is that setuptools is attempting to build pyEDA's C files from source using Visual C++, which is not installed on your machine. I recommend looking at https://www.lfd.uci.edu/~gohlke/pythonlibs/ for the Windows installation.

Prometheus1994 commented 5 years ago

@cjdrake No, actually I have Visual C++ installed on my machine and I tried to install the library through "Visual C++ 2008 64-bit Command Prompt" and "Visual C++ 2008 64-bit Cross Tools Command Prompt" and this is what I got:

C:\WINDOWS\System32>pip install boolexpr
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting boolexpr
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/boolexpr/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/boolexpr/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/boolexpr/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/boolexpr/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/boolexpr/
  Could not fetch URL https://pypi.org/simple/boolexpr/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/boolexpr/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
  Could not find a version that satisfies the requirement boolexpr (from versions: )
No matching distribution found for boolexpr
Prometheus1994 commented 5 years ago

@cjdrake There is no boolexpr package in the link you sent me. And after I looked for boolexpr binaries on google, I found this page http://mirrors.aliyun.com/pypi/simple//boolexpr/ but I can't download any file from it neither installing it directly from a prompt !!

cjdrake commented 5 years ago

Ah, my mistake. I'm used to answering questions for PyEDA, and didn't realize I'm looking at the boolexpr repository.

The latest release was 2.4 (Sept 2016), located here. I compiled a few wheels for it, including a Windows 64-bit binary for Python 3.5. I'm guessing the problem is that Python 3.7 setuptools is ignoring the wheel built for 3.5.

The issue you saw with SSL looks like something different, and I've never seen it before.

Fortunately, it looks like someone else has seen it before: https://stackoverflow.com/questions/41328451/ssl-module-in-python-is-not-available-when-installing-package-with-pip3