I installed a package to python3.7 but when I try to run the executable its getting invoked from python2.7 and it fails as its not present in python3.7
$ sudo -H pip install blobbycompanyconnect --index https://pypi.company.com/simple --user
Looking in indexes: https://pypi.company.com/simple, https://pypi.company.com/simple
Requirement already satisfied: blobbycompanyconnect in /private/var/root/.local/lib/python3.7/site-packages (1.0.0)
Requirement already satisfied: trovecompanyconnect<3.0,>=2.0 in /private/var/root/.local/lib/python3.7/site-packages (from blobbycompanyconnect) (2.0.2)
Requirement already satisfied: filelock==3.0.12 in /private/var/root/.local/lib/python3.7/site-packages (from blobbycompanyconnect) (3.0.12)
Requirement already satisfied: python-dateutil in /private/var/root/.local/lib/python3.7/site-packages (from blobbycompanyconnect) (2.8.1)
Requirement already satisfied: backoff<2.0.0,>=1.8.0 in /private/var/root/.local/lib/python3.7/site-packages (from trovecompanyconnect<3.0,>=2.0->blobbycompanyconnect) (1.10.0)
Requirement already satisfied: argcomplete<2.0.0,>=1.6.0 in /private/var/root/.local/lib/python3.7/site-packages (from trovecompanyconnect<3.0,>=2.0->blobbycompanyconnect) (1.12.0)
Requirement already satisfied: pyotp==2.3.0 in /private/var/root/.local/lib/python3.7/site-packages (from trovecompanyconnect<3.0,>=2.0->blobbycompanyconnect) (2.3.0)
Requirement already satisfied: requests<3.0.0,>=2.18.4 in /private/var/root/.local/lib/python3.7/site-packages (from trovecompanyconnect<3.0,>=2.0->blobbycompanyconnect) (2.23.0)
Requirement already satisfied: pyaml==19.4.1 in /private/var/root/.local/lib/python3.7/site-packages (from trovecompanyconnect<3.0,>=2.0->blobbycompanyconnect) (19.4.1)
Requirement already satisfied: six>=1.5 in /private/var/root/.local/lib/python3.7/site-packages (from python-dateutil->blobbycompanyconnect) (1.15.0)
Requirement already satisfied: importlib-metadata<2,>=0.23; python_version == "3.7" in /private/var/root/.local/lib/python3.7/site-packages (from argcomplete<2.0.0,>=1.6.0->trovecompanyconnect<3.0,>=2.0->blobbycompanyconnect) (1.7.0)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /private/var/root/.local/lib/python3.7/site-packages (from requests<3.0.0,>=2.18.4->trovecompanyconnect<3.0,>=2.0->blobbycompanyconnect) (1.25.10)
Requirement already satisfied: chardet<4,>=3.0.2 in /private/var/root/.local/lib/python3.7/site-packages (from requests<3.0.0,>=2.18.4->trovecompanyconnect<3.0,>=2.0->blobbycompanyconnect) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /private/var/root/.local/lib/python3.7/site-packages (from requests<3.0.0,>=2.18.4->trovecompanyconnect<3.0,>=2.0->blobbycompanyconnect) (2020.6.20)
Requirement already satisfied: idna<3,>=2.5 in /private/var/root/.local/lib/python3.7/site-packages (from requests<3.0.0,>=2.18.4->trovecompanyconnect<3.0,>=2.0->blobbycompanyconnect) (2.10)
Requirement already satisfied: PyYAML in /private/var/root/.local/lib/python3.7/site-packages (from pyaml==19.4.1->trovecompanyconnect<3.0,>=2.0->blobbycompanyconnect) (5.3.1)
Requirement already satisfied: zipp>=0.5 in /private/var/root/.local/lib/python3.7/site-packages (from importlib-metadata<2,>=0.23; python_version == "3.7"->argcomplete<2.0.0,>=1.6.0->trovecompanyconnect<3.0,>=2.0->blobbycompanyconnect) (3.1.0)
You are using pip version 19.0.3, however version 20.2.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Error:-
$ blobbycompanyconnect
Traceback (most recent call last):
File "/usr/local/bin/blobbycompanyconnect", line 6, in <module>
from blobbycompanyconnect.cli import main
File "/Library/Python/2.7/site-packages/blobbycompanyconnect/cli.py", line 6, in <module>
from .companyconnect import get_cli_creds
File "/Library/Python/2.7/site-packages/blobbycompanyconnect/companyconnect.py", line 5, in <module>
from trovecompanyconnect.companyconnect_auth_api import companyconnectAuthApi, AppToApp, BOLTENV
ImportError: No module named trovecompanyconnect.companyconnect_auth_api
Your project runs on 2.7. I don't know if you use a virtual environment, maybe you should upgrade python there or on your IDE mostly on the right bottom you can see your python version check it.
Related
I am trying to perform
pip install spacy-universal-sentence-encoder
in a miniconda3 docker container with python3.9.5, spacy and tensorflow already installed. I am using MacOS 12.1 with Apple M1 chipset. Same docker-compose is working in linux system but not working in MacOS.
Unable to install spacy-universal-sentence-encoder with
pip install git+https://github.com/MartinoMensio/spacy-universal-sentence-encoder.git as well. Getting the below error log:
(base) root#13688d1fe922:/# pip install git+https://github.com/MartinoMensio/spacy-universal-sentence-encoder.git
Collecting git+https://github.com/MartinoMensio/spacy-universal-sentence-encoder.git
Cloning https://github.com/MartinoMensio/spacy-universal-sentence-encoder.git to /tmp/pip-req-build-bln90wo6
Running command git clone --filter=blob:none --quiet https://github.com/MartinoMensio/spacy-universal-sentence-encoder.git /tmp/pip-req-build-bln90wo6
Resolved https://github.com/MartinoMensio/spacy-universal-sentence-encoder.git to commit bbc6efe924b8abc71bd4c347878822fed0bd03f7
Preparing metadata (setup.py) ... done
Requirement already satisfied: tensorflow<3.0.0,>=2.4.0 in /opt/conda/lib/python3.9/site-packages (from spacy-universal-sentence-encoder==0.4.3) (2.5.0)
Requirement already satisfied: spacy<4.0.0,>=3.0.0 in /opt/conda/lib/python3.9/site-packages (from spacy-universal-sentence-encoder==0.4.3) (3.0.3)
Collecting tensorflow-hub
Using cached tensorflow_hub-0.12.0-py2.py3-none-any.whl (108 kB)
Requirement already satisfied: srsly<3.0.0,>=2.4.0 in /opt/conda/lib/python3.9/site-packages (from spacy<4.0.0,>=3.0.0->spacy-universal-sentence-encoder==0.4.3) (2.4.2)
Requirement already satisfied: jinja2 in /opt/conda/lib/python3.9/site-packages (from spacy<4.0.0,>=3.0.0->spacy-universal-sentence-encoder==0.4.3) (3.0.3)
Requirement already satisfied: pathy in /opt/conda/lib/python3.9/site-packages (from spacy<4.0.0,>=3.0.0->spacy-universal-sentence-encoder==0.4.3) (0.6.1)
Requirement already satisfied: packaging>=20.0 in /opt/conda/lib/python3.9/site-packages (from spacy<4.0.0,>=3.0.0->spacy-universal-sentence-encoder==0.4.3) (21.3)
Requirement already satisfied: preshed<3.1.0,>=3.0.2 in /opt/conda/lib/python3.9/site-packages (from spacy<4.0.0,>=3.0.0->spacy-universal-sentence-encoder==0.4.3) (3.0.6)
Requirement already satisfied: typer<0.4.0,>=0.3.0 in /opt/conda/lib/python3.9/site-packages (from spacy<4.0.0,>=3.0.0->spacy-universal-sentence-encoder==0.4.3) (0.3.2)
Requirement already satisfied: spacy-legacy<3.1.0,>=3.0.0 in /opt/conda/lib/python3.9/site-packages (from spacy<4.0.0,>=3.0.0->spacy-universal-sentence-encoder==0.4.3) (3.0.9)
Requirement already satisfied: cymem<2.1.0,>=2.0.2 in /opt/conda/lib/python3.9/site-packages (from spacy<4.0.0,>=3.0.0->spacy-universal-sentence-encoder==0.4.3) (2.0.6)
Requirement already satisfied: requests<3.0.0,>=2.13.0 in /opt/conda/lib/python3.9/site-packages (from spacy<4.0.0,>=3.0.0->spacy-universal-sentence-encoder==0.4.3) (2.25.1)
Requirement already satisfied: pydantic<1.8.0,>=1.7.1 in /opt/conda/lib/python3.9/site-packages (from spacy<4.0.0,>=3.0.0->spacy-universal-sentence-encoder==0.4.3) (1.7.3)
Requirement already satisfied: catalogue<2.1.0,>=2.0.1 in /opt/conda/lib/python3.9/site-packages (from spacy<4.0.0,>=3.0.0->spacy-universal-sentence-encoder==0.4.3) (2.0.6)
Requirement already satisfied: tqdm<5.0.0,>=4.38.0 in /opt/conda/lib/python3.9/site-packages (from spacy<4.0.0,>=3.0.0->spacy-universal-sentence-encoder==0.4.3) (4.61.2)
Requirement already satisfied: thinc<8.1.0,>=8.0.0 in /opt/conda/lib/python3.9/site-packages (from spacy<4.0.0,>=3.0.0->spacy-universal-sentence-encoder==0.4.3) (8.0.3)
Requirement already satisfied: blis<0.8.0,>=0.4.0 in /opt/conda/lib/python3.9/site-packages (from spacy<4.0.0,>=3.0.0->spacy-universal-sentence-encoder==0.4.3) (0.7.6)
Requirement already satisfied: wasabi<1.1.0,>=0.8.1 in /opt/conda/lib/python3.9/site-packages (from spacy<4.0.0,>=3.0.0->spacy-universal-sentence-encoder==0.4.3) (0.9.0)
Requirement already satisfied: numpy>=1.15.0 in /opt/conda/lib/python3.9/site-packages (from spacy<4.0.0,>=3.0.0->spacy-universal-sentence-encoder==0.4.3) (1.22.2)
Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in /opt/conda/lib/python3.9/site-packages (from spacy<4.0.0,>=3.0.0->spacy-universal-sentence-encoder==0.4.3) (1.0.6)
Requirement already satisfied: setuptools in /opt/conda/lib/python3.9/site-packages (from spacy<4.0.0,>=3.0.0->spacy-universal-sentence-encoder==0.4.3) (52.0.0.post20210302)
Requirement already satisfied: wheel>=0.35 in /opt/conda/lib/python3.9/site-packages (from tensorflow<3.0.0,>=2.4.0->spacy-universal-sentence-encoder==0.4.3) (0.35.1)
Requirement already satisfied: google-pasta~=0.2 in /opt/conda/lib/python3.9/site-packages (from tensorflow<3.0.0,>=2.4.0->spacy-universal-sentence-encoder==0.4.3) (0.2.0)
Requirement already satisfied: wrapt>=1.11.2 in /opt/conda/lib/python3.9/site-packages (from tensorflow<3.0.0,>=2.4.0->spacy-universal-sentence-encoder==0.4.3) (1.13.3)
Requirement already satisfied: tensorboard~=2.5 in /opt/conda/lib/python3.9/site-packages (from tensorflow<3.0.0,>=2.4.0->spacy-universal-sentence-encoder==0.4.3) (2.5.0)
Requirement already satisfied: h5py>=3.1.0 in /opt/conda/lib/python3.9/site-packages (from tensorflow<3.0.0,>=2.4.0->spacy-universal-sentence-encoder==0.4.3) (3.4.0)
Requirement already satisfied: flatbuffers~=1.12 in /opt/conda/lib/python3.9/site-packages (from tensorflow<3.0.0,>=2.4.0->spacy-universal-sentence-encoder==0.4.3) (1.12)
Requirement already satisfied: opt-einsum~=3.3.0 in /opt/conda/lib/python3.9/site-packages (from tensorflow<3.0.0,>=2.4.0->spacy-universal-sentence-encoder==0.4.3) (3.3.0)
Requirement already satisfied: keras-preprocessing>=1.1.2 in /opt/conda/lib/python3.9/site-packages (from tensorflow<3.0.0,>=2.4.0->spacy-universal-sentence-encoder==0.4.3) (1.1.2)
Collecting keras>=2.4.0
Downloading keras-2.8.0-py2.py3-none-any.whl (1.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 4.7 MB/s eta 0:00:00
Collecting absl-py~=0.10
Downloading absl_py-0.15.0-py3-none-any.whl (132 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 132.0/132.0 KB 3.9 MB/s eta 0:00:00
Collecting grpcio~=1.34.0
Downloading grpcio-1.34.1.tar.gz (21.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 21.1/21.1 MB 6.3 MB/s eta 0:00:00
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-frvesr2c/grpcio_21754ae7083c4d7283d5ea7f44dbb15c/setup.py", line 229, in <module>
if check_linker_need_libatomic():
File "/tmp/pip-install-frvesr2c/grpcio_21754ae7083c4d7283d5ea7f44dbb15c/setup.py", line 176, in check_linker_need_libatomic
cpp_test = subprocess.Popen([cxx, '-x', 'c++', '-std=c++11', '-'],
File "/opt/conda/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/opt/conda/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'c++'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
I'm trying to install sceptre with the command pip install sceptre. But I get the output below.
Requirement already satisfied: sceptre in /usr/local/lib/python3.9/site-packages (2.5.0)
Requirement already satisfied: Jinja2<3,>=2.8 in /usr/local/lib/python3.9/site-packages (from sceptre) (2.11.3)
Requirement already satisfied: PyYaml<6.0,>=5.1 in /usr/local/lib/python3.9/site-packages (from sceptre) (5.4.1)
Requirement already satisfied: networkx<3,>=2.4 in /usr/local/lib/python3.9/site-packages (from sceptre) (2.5.1)
Requirement already satisfied: click<8.0,>=7.0 in /usr/local/lib/python3.9/site-packages (from sceptre) (7.1.2)
Requirement already satisfied: boto3<2.0,>=1.3 in /usr/local/lib/python3.9/site-packages (from sceptre) (1.17.67)
Requirement already satisfied: colorama>=0.3.9 in /usr/local/lib/python3.9/site-packages (from sceptre) (0.4.4)
Requirement already satisfied: six<2.0.0,>=1.11.0 in /usr/local/lib/python3.9/site-packages (from sceptre) (1.16.0)
Requirement already satisfied: packaging<17.0,>=16.8 in /usr/local/lib/python3.9/site-packages (from sceptre) (16.8)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /usr/local/lib/python3.9/site-packages (from boto3<2.0,>=1.3->sceptre) (0.10.0)
Requirement already satisfied: botocore<1.21.0,>=1.20.67 in /usr/local/lib/python3.9/site-packages (from boto3<2.0,>=1.3->sceptre) (1.20.67)
Requirement already satisfied: s3transfer<0.5.0,>=0.4.0 in /usr/local/lib/python3.9/site-packages (from boto3<2.0,>=1.3->sceptre) (0.4.2)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /usr/local/lib/python3.9/site-packages (from botocore<1.21.0,>=1.20.67->boto3<2.0,>=1.3->sceptre) (2.8.1)
Requirement already satisfied: urllib3<1.27,>=1.25.4 in /usr/local/lib/python3.9/site-packages (from botocore<1.21.0,>=1.20.67->boto3<2.0,>=1.3->sceptre) (1.26.4)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.9/site-packages (from Jinja2<3,>=2.8->sceptre) (2.0.1)
Requirement already satisfied: decorator<5,>=4.3 in /usr/local/lib/python3.9/site-packages (from networkx<3,>=2.4->sceptre) (4.4.2)
Requirement already satisfied: pyparsing in /usr/local/lib/python3.9/site-packages (from packaging<17.0,>=16.8->sceptre) (2.4.7)
Tried this
pip uninstall sceptre
pip install sceptre
I read some questions here on stackoverflow. People usually resolve this issue with reinstalling the package. In my case, it didn't work. When I run pip list, I can see the version. But I can't run sceptre --version command. Where am I doing wrong?
Thanks!
Can anyone help in providing the steps to install Spacy package? I am facing a lot of difficulties in setting it up without an internet connection. Facing a lot of errors. Steps would be really helpful.
As of now I manually downloaded the dependencies (whl files) and installed. Spacy package is also successfully installed. But when I tried to import I am facing the problem.
(base) C:\Windows\system32>pip install E:/PythonPacakges/spacy-2.0.16-cp36-cp36m-win_amd64.whl
Requirement already satisfied: spacy==2.0.16 from file:///E:/PythonPacakges/spacy-2.0.16-cp36-cp36m-win_amd64.whl in d:\programdata\anaconda3\lib\site-packages (2.0.16)
Requirement already satisfied: preshed>=2.0.1 in d:\programdata\anaconda3\lib\site-packages (from spacy==2.0.16) (2.0.1)
Requirement already satisfied: plac>=0.9.6 in d:\programdata\anaconda3\lib\site-packages (from spacy==2.0.16) (0.9.6)
Requirement already satisfied: dill>=0.2 in d:\programdata\anaconda3\lib\site-packages (from spacy==2.0.16) (0.2.8.2)
Requirement already satisfied: msgpack-numpy in d:\programdata\anaconda3\lib\site-packages (from spacy==2.0.16) (0.4.4.2)
Requirement already satisfied: cymem>=2.0.2 in d:\programdata\anaconda3\lib\site-packages (from spacy==2.0.16) (2.0.2)
Requirement already satisfied: regex>=2018.01.10 in d:\programdata\anaconda3\lib\site-packages (from spacy==2.0.16) (2018.11.22)
Requirement already satisfied: requests>=2.13.0 in d:\programdata\anaconda3\lib\site-packages (from spacy==2.0.16) (2.18.4)
Requirement already satisfied: numpy in d:\programdata\anaconda3\lib\site-packages (from spacy==2.0.16) (1.14.3)
Requirement already satisfied: murmurhash>=0.28.0 in d:\programdata\anaconda3\lib\site-packages (from spacy==2.0.16) (1.0.1)
Requirement already satisfied: thinc>=6.12.0 in d:\programdata\anaconda3\lib\site-packages (from spacy==2.0.16) (6.12.0)
Requirement already satisfied: ujson>=1.35 in d:\programdata\anaconda3\lib\site-packages (from spacy==2.0.16) (1.35)
Requirement already satisfied: msgpack>=0.5.2 in d:\programdata\anaconda3\lib\site-packages (from msgpack-numpy->spacy==2.0.16) (0.5.6)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in d:\programdata\anaconda3\lib\site-packages (from requests>=2.13.0->spacy==2.0.16) (3.0.4)
Requirement already satisfied: idna<2.7,>=2.5 in d:\programdata\anaconda3\lib\site-packages (from requests>=2.13.0->spacy==2.0.16) (2.6)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in d:\programdata\anaconda3\lib\site-packages (from requests>=2.13.0->spacy==2.0.16) (1.22)
Requirement already satisfied: certifi>=2017.4.17 in d:\programdata\anaconda3\lib\site-packages (from requests>=2.13.0->spacy==2.0.16) (2018.4.16)
Requirement already satisfied: cytoolz>=0.9.0 in d:\programdata\anaconda3\lib\site-packages (from thinc>=6.12.0->spacy==2.0.16) (0.9.0.1)
Requirement already satisfied: tqdm>=4.10.0 in d:\programdata\anaconda3\lib\site-packages (from thinc>=6.12.0->spacy==2.0.16) (4.28.1)
Requirement already satisfied: six>=1.10.0 in d:\programdata\anaconda3\lib\site-packages (from thinc>=6.12.0->spacy==2.0.16) (1.11.0)
Requirement already satisfied: wrapt>=1.10.0 in d:\programdata\anaconda3\lib\site-packages (from thinc>=6.12.0->spacy==2.0.16) (1.10.11)
Requirement already satisfied: toolz>=0.8.0 in d:\programdata\anaconda3\lib\site-packages (from cytoolz>=0.9.0->thinc>=6.12.0->spacy==2.0.16) (0.9.0)
(base) C:\Windows\system32>python
Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import spacy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "D:\ProgramData\Anaconda3\lib\site-packages\spacy\__init__.py", line 8, in <module>
from thinc.neural.util import prefer_gpu, require_gpu
File "D:\ProgramData\Anaconda3\lib\site-packages\thinc\neural\__init__.py", line 1, in <module>
from ._classes.model import Model
File "D:\ProgramData\Anaconda3\lib\site-packages\thinc\neural\_classes\model.py", line 11, in <module>
from .. import util
File "D:\ProgramData\Anaconda3\lib\site-packages\thinc\neural\util.py", line 3, in <module>
from preshed.maps import PreshMap
File "cymem.pxd", line 1, in init preshed.maps
ValueError: cymem.cymem.Pool has the wrong size, try recompiling. Expected 64, got 48
>>>
So I went through the same, fixed it uninstalling all spacy related packages and files then reinstalling it to version 2.0.13. You can do this by-
pip install spacy ==2.0.13
For conda i suppose doing the same with 'conda install spacy ==2.0.13' should also work.
Edit - You can do this without uninstalling spacy aswell
Any idea why this error occurs? I'm inside a virtual environment I created in anaconda3, using MAC. I tried several fixes from previous threads but it didn't work.
(env)iMac.local:~$pip install --upgrade pip
Requirement already up-to-date: pip in ./anaconda3/envs/CAT/lib/python3.5/site-packages (10.0.1)
distributed 1.21.8 requires msgpack, which is not installed.
(env)iMac.local:~$pip install numpy
Requirement already satisfied: numpy in ./anaconda3/envs/CAT/lib/python3.5/site-packages (1.14.3)
distributed 1.21.8 requires msgpack, which is not installed.
(env)iMac.local:~$pip3 install msgpack-python
Requirement already satisfied: msgpack-python in ./anaconda3/lib/python3.6/site-packages (0.4.8)
(env)iMac.local:~$pip install numpy
Requirement already satisfied: numpy in ./anaconda3/envs/CAT/lib/python3.5/site-packages (1.14.3)
distributed 1.21.8 requires msgpack, which is not installed.
(env)iMac.local:~$pip3 install --only-binary :all: distributed
Requirement already satisfied: distributed in ./anaconda3/lib/python3.6/site-packages (1.19.1)
Requirement already satisfied: tornado>=4.5.1 in ./anaconda3/lib/python3.6/site-packages (from distributed) (4.5.2)
Requirement already satisfied: toolz>=0.7.4 in ./anaconda3/lib/python3.6/site-packages (from distributed) (0.8.2)
Requirement already satisfied: msgpack-python in ./anaconda3/lib/python3.6/site-packages (from distributed) (0.4.8)
Requirement already satisfied: cloudpickle>=0.2.2 in ./anaconda3/lib/python3.6/site-packages (from distributed) (0.4.0)
Requirement already satisfied: dask>=0.14.1 in ./anaconda3/lib/python3.6/site-packages (from distributed) (0.15.3)
Requirement already satisfied: click>=6.6 in ./anaconda3/lib/python3.6/site-packages (from distributed) (6.7)
Requirement already satisfied: six in ./anaconda3/lib/python3.6/site-packages (from distributed) (1.11.0)
Requirement already satisfied: tblib in ./anaconda3/lib/python3.6/site-packages (from distributed) (1.3.2)
Requirement already satisfied: psutil in ./anaconda3/lib/python3.6/site-packages (from distributed) (5.4.0)
Requirement already satisfied: zict>=0.1.3 in ./anaconda3/lib/python3.6/site-packages (from distributed) (0.1.3)
Requirement already satisfied: sortedcontainers in ./anaconda3/lib/python3.6/site-packages (from distributed) (1.5.7)
Requirement already satisfied: heapdict in ./anaconda3/lib/python3.6/site-packages (from zict>=0.1.3->distributed) (1.0.0)
(env)iMac.local:~$pip install numpy
Requirement already satisfied: numpy in ./anaconda3/envs/CAT/lib/python3.5/site-packages (1.14.3)
distributed 1.21.8 requires msgpack, which is not installed.
(env)iMac.local:~$
I installed scrapy using pip install scrapy on Windows 10. It shows ImportError: cannot import name 'dispatcher'. I am using Python 3.5.
Help would be appreciated. Thank you.
Here is the complete trace:
"C:\Users\sameer\AppData\Local\Programs\Python\Python35\Scripts\scrapy.exe\__main__.py", line 5, in <module>
File "c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages\scrapy\cmdline.py", line 9, in <module>
from scrapy.crawler import CrawlerProcess
File "c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages\scrapy\crawler.py", line 15, in <module>
from scrapy.signalmanager import SignalManager
File "c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages\scrapy\signalmanager.py", line 2, in <module>
from pydispatch import dispatcher
ImportError: cannot import name 'dispatcher'
OUTPUT of pip install scrapy
Requirement already satisfied: scrapy in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (1.5.0)
Requirement already satisfied: cssselect>=0.9 in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from scrapy) (1.0.3)
Requirement already satisfied: parsel>=1.1 in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from scrapy) (1.4.0)
Requirement already satisfied: w3lib>=1.17.0 in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from scrapy) (1.19.0)
Requirement already satisfied: six>=1.5.2 in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from scrapy) (1.11.0)
Requirement already satisfied: PyDispatcher>=2.0.5 in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from scrapy) (2.0.5)
Requirement already satisfied: pyOpenSSL in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from scrapy) (18.0.0)
Requirement already satisfied: lxml in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from scrapy) (4.2.2)
Requirement already satisfied: queuelib in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from scrapy) (1.5.0)
Requirement already satisfied: service-identity in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from scrapy) (17.0.0)
Requirement already satisfied: Twisted>=13.1.0 in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from scrapy) (18.4.0)
Requirement already satisfied: cryptography>=2.2.1 in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from pyOpenSSL->scrapy) (2.2.2)
Requirement already satisfied: pyasn1 in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from service-identity->scrapy) (0.4.3)
Requirement already satisfied: pyasn1-modules in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from service-identity->scrapy) (0.2.1)
Requirement already satisfied: attrs in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from service-identity->scrapy) (18.1.0)
Requirement already satisfied: zope.interface>=4.4.2 in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from Twisted>=13.1.0->scrapy) (4.5.0)
Requirement already satisfied: constantly>=15.1 in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from Twisted>=13.1.0->scrapy) (15.1.0)
Requirement already satisfied: incremental>=16.10.1 in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from Twisted>=13.1.0->scrapy) (17.5.0)
Requirement already satisfied: Automat>=0.3.0 in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from Twisted>=13.1.0->scrapy) (0.7.0)
Requirement already satisfied: hyperlink>=17.1.1 in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from Twisted>=13.1.0->scrapy) (18.0.0)
Requirement already satisfied: idna>=2.1 in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from cryptography>=2.2.1->pyOpenSSL->scrapy) (2.7)
Requirement already satisfied: cffi>=1.7; platform_python_implementation != "PyPy" in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from cryptography>=2.2.1->pyOpenSSL->scrapy) (1.11.5)
Requirement already satisfied: asn1crypto>=0.21.0 in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from cryptography>=2.2.1->pyOpenSSL->scrapy) (0.24.0)
Requirement already satisfied: setuptools in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from zope.interface>=4.4.2->Twisted>=13.1.0->scrapy) (39.2.0)
Requirement already satisfied: pycparser in c:\users\sameer\appdata\local\programs\python\python35\lib\site-packages (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography>=2.2.1->pyOpenSSL->scrapy) (2.18)
have you tried pip install dispatcher
edit:
when trying to install it myself, i've noticed some broken dependencies.
flask-babelex 0.9.3 requires speaklater>=1.2, which is not installed.
pyasn1-modules 0.2.1 has requirement pyasn1<0.5.0,>=0.4.1, but you'll have pyasn1 0.1.9 which is incompatible.
So I fixed the dependencies as written, first pip install speaklater,
then pip uninstall pyasn1 && pip install pyasn1
after all dependencies were met, scrapy worked fine.
Can you show the output of 'pip install scrapy'?
You need to make sure that you use pip for Python3, in case you also have Python2 installed. Then you should use: pip3 install PyDispatcher (currently at version 2.0.5). Then you import with:
from scrapy import signals
from scrapy.xlib.pydispatch import dispatcher
...
signal may or may not be optional, depending on what else you want to do.