fastai / courses

fast.ai Courses
Apache License 2.0
5.61k stars 2.74k forks source link

keras==1.2.2 is conflicts with other libraries #238

Closed osok closed 1 year ago

osok commented 1 year ago

The current requirements.txt is not valid.

INFO: pip is looking at multiple versions of keras to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install -r requirements.txt (line 6) and keras==1.2.2 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested keras==1.2.2
    tensorflow 2.10.1 depends on keras<2.11 and >=2.10.0
    The user requested keras==1.2.2
    tensorflow 2.10.0 depends on keras<2.11 and >=2.10.0
    The user requested keras==1.2.2
    tensorflow 2.9.3 depends on keras<2.10.0 and >=2.9.0rc0
    The user requested keras==1.2.2
    tensorflow 2.9.2 depends on keras<2.10.0 and >=2.9.0rc0
    The user requested keras==1.2.2
    tensorflow 2.9.1 depends on keras<2.10.0 and >=2.9.0rc0
    The user requested keras==1.2.2
    tensorflow 2.9.0 depends on keras<2.10.0 and >=2.9.0rc0
    The user requested keras==1.2.2
    tensorflow 2.8.4 depends on keras<2.9 and >=2.8.0rc0
    The user requested keras==1.2.2
    tensorflow 2.8.3 depends on keras<2.9 and >=2.8.0rc0
    The user requested keras==1.2.2
    tensorflow 2.8.2 depends on keras<2.9 and >=2.8.0rc0
    The user requested keras==1.2.2
    tensorflow 2.8.1 depends on keras<2.9 and >=2.8.0rc0
    The user requested keras==1.2.2
    tensorflow 2.8.0 depends on keras<2.9 and >=2.8.0rc0

EDIT Update I did upgrade my local requirements.txt so that keras==2.11.0 and this works. J+However I have a new problem below.

osok commented 1 year ago

Additionally bcolz won't install


      C:\Users\michael\anaconda3\envs\fastai\include\cpython/pystate.h(60): note: see declaration of '_ts'
      bcolz\carray_ext.c(12347): fatal error C1003: error count exceeds 100; stopping compilation
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> bcolz

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

(fastai) C:\Users\michael\Documents\fastai\courses>pip install --use-pep517
ERROR: You must give at least one requirement to install (see "pip help install")

(fastai) C:\Users\michael\Documents\fastai\courses>pip install --use-pep517 bcolz
Collecting bcolz
  Using cached bcolz-1.2.1.tar.gz (1.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy>=1.7 in c:\users\michael\anaconda3\envs\fastai\lib\site-packages (from bcolz) (1.24.3)
Building wheels for collected packages: bcolz
  Building wheel for bcolz (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for bcolz (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [264 lines of output]
      SSE2 detected
      AVX2 detectedt build:

I did use the --use-pep517


      bcolz\carray_ext.c(12347): fatal error C1003: error count exceeds 100; stopping compilation
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for bcolz
Failed to build bcolz
ERROR: Could not build wheels for bcolz, which is required to install pyproject.toml-based projects

I get that these are likely problems outside of this project, but they are in the requirements.txt and when they don't work the environment is not able to support the project.

osok commented 1 year ago

Fixed : I was only ever trying python 3.9, 3.10 and 3.11, since there are security issues with 3.8 and there is no longer any support. Well going back to python 3.8 this worked.