Я пытаюсь запустить этот ноутбук . Тем не менее у меня возникла проблема при импорте первой библиотеки from keras.layers import Input, Dense
. Действительно, я получил следующую ошибку:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-885228b1746a> in <module>
----> 1 from keras.layers import Input, Dense
2 from keras.models import Model, Sequential
3 from keras import regularizers
4 from sklearn.model_selection import train_test_split
5 from sklearn.linear_model import LogisticRegression
C:\ProgramData\Anaconda3\lib\site-packages\keras\__init__.py in <module>
2
3 from . import utils
----> 4 from . import activations
5 from . import applications
6 from . import backend
C:\ProgramData\Anaconda3\lib\site-packages\keras\activations.py in <module>
4 from . import backend as K
5 from .utils.generic_utils import deserialize_keras_object
----> 6 from .engine import Layer
7
8
C:\ProgramData\Anaconda3\lib\site-packages\keras\engine\__init__.py in <module>
6 from .topology import Layer
7 from .topology import get_source_inputs
----> 8 from .training import Model
C:\ProgramData\Anaconda3\lib\site-packages\keras\engine\training.py in <module>
23 from .. import metrics as metrics_module
24 from ..utils.generic_utils import Progbar
---> 25 from .. import callbacks as cbks
26 from ..legacy import interfaces
27
C:\ProgramData\Anaconda3\lib\site-packages\keras\callbacks.py in <module>
24 if K.backend() == 'tensorflow':
25 import tensorflow as tf
---> 26 from tensorflow.contrib.tensorboard.plugins import projector
27
28
ModuleNotFoundError: No module named 'tensorflow.contrib'
Поэтому я попытался удалить ее и переустановить версию 1.13.2 , как она, кажется, работает для PemaGrg . И все же я получил следующее:
(base) C:\Users\antoi\Documents\Programming\PanelTutorial\glaciers>python -m pip uninstall tensorflow
Uninstalling tensorflow-2.0.0:
Would remove:
c:\programdata\anaconda3\lib\site-packages\tensorflow-2.0.0.dist-info\*
c:\programdata\anaconda3\lib\site-packages\tensorflow\*
c:\programdata\anaconda3\lib\site-packages\tensorflow_core\*
c:\programdata\anaconda3\scripts\saved_model_cli.exe
c:\programdata\anaconda3\scripts\tensorboard.exe
c:\programdata\anaconda3\scripts\tf_upgrade_v2.exe
c:\programdata\anaconda3\scripts\tflite_convert.exe
c:\programdata\anaconda3\scripts\toco.exe
c:\programdata\anaconda3\scripts\toco_from_protos.exe
Proceed (y/n)? y
Successfully uninstalled tensorflow-2.0.0
ERROR: Exception:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\shutil.py", line 395, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'c:\\programdata\\anaconda3\\lib\\site-packages\\~~nsorflow_core\\lite\\experimental\\microfrontend\\python\\ops\\_audio_microfrontend_op.so'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\antoi\AppData\Roaming\Python\Python37\site-packages\pip\_internal\cli\base_command.py", line 188, in main
status = self.run(options, args)
File "C:\Users\antoi\AppData\Roaming\Python\Python37\site-packages\pip\_internal\commands\uninstall.py", line 78, in run
uninstall_pathset.commit()
File "C:\Users\antoi\AppData\Roaming\Python\Python37\site-packages\pip\_internal\req\req_uninstall.py", line 444, in commit
self._moved_paths.commit()
File "C:\Users\antoi\AppData\Roaming\Python\Python37\site-packages\pip\_internal\req\req_uninstall.py", line 284, in commit
save_dir.cleanup()
File "C:\Users\antoi\AppData\Roaming\Python\Python37\site-packages\pip\_internal\utils\temp_dir.py", line 83, in cleanup
rmtree(self.path)
File "C:\Users\antoi\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\retrying.py", line 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "C:\Users\antoi\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\retrying.py", line 212, in call
raise attempt.get()
File "C:\Users\antoi\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\retrying.py", line 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
File "C:\Users\antoi\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\six.py", line 693, in reraise
raise value
File "C:\Users\antoi\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\retrying.py", line 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "C:\Users\antoi\AppData\Roaming\Python\Python37\site-packages\pip\_internal\utils\misc.py", line 166, in rmtree
onerror=rmtree_errorhandler)
File "C:\ProgramData\Anaconda3\lib\shutil.py", line 513, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\ProgramData\Anaconda3\lib\shutil.py", line 392, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\ProgramData\Anaconda3\lib\shutil.py", line 392, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\ProgramData\Anaconda3\lib\shutil.py", line 392, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
[Previous line repeated 2 more times]
File "C:\ProgramData\Anaconda3\lib\shutil.py", line 397, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
File "C:\Users\antoi\AppData\Roaming\Python\Python37\site-packages\pip\_internal\utils\misc.py", line 178, in rmtree_errorhandler
func(path)
PermissionError: [WinError 5] Access is denied: 'c:\\programdata\\anaconda3\\lib\\site-packages\\~~nsorflow_core\\lite\\experimental\\microfrontend\\python\\ops\\_audio_microfrontend_op.so'