Не могу запустить Jupyter Notebook из моей новой среды в Конде - PullRequest
0 голосов
/ 16 апреля 2020

Я создал новую среду для разработки spacy связанных проектов.

Мой код был следующим:

conda create --name spcy
C:\WINDOWS\system32>conda activate spcy
conda update --all
conda install -c conda-forge spacy

Я проверил, что могу импортировать spacy.

(spcy) C:\WINDOWS\system32>python
Python 3.6.10 (default, Mar  5 2020, 10:17:47) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import spacy
>>> quit()

(spcy) C:\WINDOWS\system32>conda install ipykernel
(spcy) C:\WINDOWS\system32>ipython kernel install --name spcy --user
Installed kernelspec spcy in C:\Users\Alienware\AppData\Roaming\jupyter\kernels\spcy

Но когда я пытаюсь запустить ноутбук Jupyter, возникает ошибка:

(spcy) C:\WINDOWS\system32>jupyter notebook
Traceback (most recent call last):
  File "C:\Users\Alienware\Anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 9, in <module>
    import sqlite3
  File "C:\Users\Alienware\Anaconda3\lib\sqlite3\__init__.py", line 23, in <module>
    from sqlite3.dbapi2 import *
  File "C:\Users\Alienware\Anaconda3\lib\sqlite3\dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Alienware\Anaconda3\Scripts\jupyter-notebook-script.py", line 6, in <module>
    from notebook.notebookapp import main
  File "C:\Users\Alienware\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 83, in <module>
    from .services.sessions.sessionmanager import SessionManager
  File "C:\Users\Alienware\Anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 12, in <module>
    from pysqlite2 import dbapi2 as sqlite3
ModuleNotFoundError: No module named 'pysqlite2'

Когда я пытался установить pysqlite2, я получал новую ошибку:

(spcy) C:\WINDOWS\system32>pip install pysqlite
Collecting pysqlite
  Downloading pysqlite-2.8.3.tar.gz (80 kB)
     |████████████████████████████████| 80 kB 193 kB/s
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\Alienware\Anaconda3\envs\spcy\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Alienware\\AppData\\Local\\Temp\\pip-install-bry2jvcn\\pysqlite\\setup.py'"'"'; __file__='"'"'C:\\Users\\Alienware\\AppData\\Local\\Temp\\pip-install-bry2jvcn\\pysqlite\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Alienware\AppData\Local\Temp\pip-install-bry2jvcn\pysqlite\pip-egg-info'
         cwd: C:\Users\Alienware\AppData\Local\Temp\pip-install-bry2jvcn\pysqlite\
    Complete output (1 lines):
    pysqlite is not supported on Python 3. When using Python 3, use the sqlite3 module from the standard library.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Что мне делать запустить Jupyter Notebook и работать в среде spcy?

...