Can't install spacy for NLP tasks - pip

I'm trying to install spaCy for NLP tasks but when I follow the first instruction from https://spacy.io/usage (pip install -U pip setuptools wheel) I get the error below. I believe my error may come from me creating two different users for my laptop, my lack of understanding of environment variables, virtual environments, and my path variable. I also do not understand the message about no metadata being found.
Microsoft Windows [Version 10.0.19043.1706]
(c) Microsoft Corporation. All rights reserved.
C:\Python310\Scripts>pip install -U pip setuptools wheel
Requirement already satisfied: pip in c:\users\user\appdata\roaming\python\python310\site-packages (22.0.4)
Collecting pip
Using cached pip-22.1.2-py3-none-any.whl (2.1 MB)
Requirement already satisfied: setuptools in c:\python310\lib\site-packages (62.3.2)
Requirement already satisfied: wheel in c:\python310\lib\site-packages (0.37.1)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 22.0.4
Uninstalling pip-22.0.4:
Successfully uninstalled pip-22.0.4
WARNING: No metadata found in c:\users\user\appdata\roaming\python\python310\site-packages
Rolling back uninstall of pip
Moving to c:\users\user\appdata\roaming\python\python310\scripts\pip.exe
from C:\Users\User\AppData\Local\Temp\pip-uninstall-on_65qs2\pip.exe
Moving to c:\users\user\appdata\roaming\python\python310\scripts\pip3.10.exe
from C:\Users\User\AppData\Local\Temp\pip-uninstall-on_65qs2\pip3.10.exe
Moving to c:\users\user\appdata\roaming\python\python310\scripts\pip3.exe
from C:\Users\User\AppData\Local\Temp\pip-uninstall-on_65qs2\pip3.exe
Moving to c:\users\user\appdata\roaming\python\python310\site-packages\pip-22.0.4.dist-info\
from C:\Users\User\AppData\Roaming\Python\Python310\site-packages\~ip-22.0.4.dist-info
Moving to c:\users\user\appdata\roaming\python\python310\site-packages\pip\
from C:\Users\User\AppData\Roaming\Python\Python310\site-packages\~ip
ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\\Python310\\Lib\\site-packages\\pip\\__init__.py'
Consider using the `--user` option or check the permissions.
WARNING: You are using pip version 22.0.4; however, version 22.1.2 is available.
You should consider upgrading via the 'C:\Python310\python.exe -m pip install --upgrade pip' command.
C:\Python310\Scripts>
Screenshot of error message

Related

How can I install torch and torchvision with pip and python 3.8.3 on windows in an virtual environment?

I created a virtual environment for my project and I'm trying to install torch via pip.
pip install torch===1.5.1 torchvision===0.6.1 -f https://download.pytorch.org/whl/torch_stable.html
This gives me the error -
ERROR: Could not find a version that satisfies the requirement torch===1.5.1 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch===1.5.1
Some solutions recommend the use of conda, is it necessary? Can I not do it through just pip
You can try to install directly from the wheels files:
pip install https://download.pytorch.org/whl/cu102/torch-1.5.1-cp36-cp36m-win_amd64.whl
pip install https://download.pytorch.org/whl/cu102/torchvision-0.6.1-cp36-cp36m-win_amd64.whl

Trouble using PIP Install

Having trouble installing any packages or upgrading through PIP install. basically i want to install packages for Data Science. Not able to use CONDA either.
Error I got-
ERROR: Could not find a version that satisfies the requirement menuinst (from conda) (from versions: none)
ERROR: No matching distribution found for menuinst (from conda)
WARNING: You are using pip version 19.2.3, however version 20.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

OpenVino on MacOS using Anaconda

How do you go about installing OpenVino using Anaconda. Will this be possible with prerequisites like OpenCV and CMake that are required for installation.
(IntelEnv) ChrNinja#ChrNinja demo % ./demo_squeezenet_download_convert_run.sh
target_precision = FP16
[setupvars.sh] OpenVINO environment initialized
###################################################
Downloading the Caffe model and the prototxt
Installing dependencies
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Processing /Users/christianh/Library/Caches/pip/wheels/a7/c1/ea/cf5bd31012e735dc1dfea3131a2d5eae7978b251083d6247bd/PyYAML-5.3.1-cp27-cp27m-macosx_10_15_x86_64.whl
Collecting requests
Using cached https://files.pythonhosted.org/packages/1a/70/1935c770cb3be6e3a8b78ced23d7e0f3b187f5cbfab4749523ed65d7c9b1/requests-2.23.0-py2.py3-none-any.whl
Collecting idna<3,>=2.5
Using cached https://files.pythonhosted.org/packages/89/e3/afebe61c546d18fb1709a61bee788254b40e736cff7271c7de5de2dc4128/idna-2.9-py2.py3-none-any.whl
Collecting chardet<4,>=3.0.2
Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting certifi>=2017.4.17
Using cached https://files.pythonhosted.org/packages/57/2b/26e37a4b034800c960a00c4e1b3d9ca5d7014e983e6e729e33ea2f36426c/certifi-2020.4.5.1-py2.py3-none-any.whl
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
Using cached https://files.pythonhosted.org/packages/e1/e5/df302e8017440f111c11cc41a6b432838672f5a70aa29227bf58149dc72f/urllib3-1.25.9-py2.py3-none-any.whl
Installing collected packages: pyyaml, idna, chardet, certifi, urllib3, requests
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/PyYAML-5.3.1.dist-info'
Consider using the `--user` option or check the permissions.
Error on or near line 150; exiting with status 1
1. Update conda to latest version:
conda update --all
2. Install the Intel® Distribution of OpenVINO™ Toolkit:
conda install openvino-ie4py -c openvino
3. Install OpenCV. This is required to run a sample:
conda install opencv
4. Verify the package installed:
python -c “import openvino”

Cannot start qutebrowser, installed packages are shown as missing

I'm trying to install qutebrowser with tox and followed the instructions on this page.
However, this didn't work. When I run
python3 -m qutebrowser
I get one of the error messages
Fatal error: jinja2 is required to run qutebrowser but could not be imported! Maybe it's not installed?
The error encountered was:
No module named 'jinja2'
Please search for the python3 version of jinja2 in your distributions packages, or see https://github.com/qutebrowser/qutebrowser/blob/master/doc/install.asciidoc
If you installed a qutebrowser package for your distribution, please report this as a bug.
or the same with PyYAML/yaml instead of jinja2.
However, if I run
sudo pip install jinja2
sudo pip install pyyaml
I get
Requirement already satisfied: jinja2 in /usr/local/lib/python2.7/dist-packages (2.10.1)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/lib/python2.7/dist-packages (from jinja2) (0.23)
Requirement already satisfied: pyyaml in /usr/local/lib/python2.7/dist-packages (5.1)
I guess the problem may be that the installed versions are for python2.7, however I followed these instructions without change.
You followed those instructions with a change: you run python3 instead of python.
If you have both Python 2.7 and Python 3 installed to install packages for Python 3 you need to run pip3 install or python3 -m pip install.

Installing Tensorflow with Python 3.5 and Anaconda

I have Anaconda 3.19.3 with Python 3.5 on a Mac. Now, I would like to install TensorFlow via pip. The installation instructions here also include setup instructions for installing TensorFlow under Python 3.3+.
So, I have executed sudo easy_install --upgrade six, no problem. When I execute sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.7.0-py3-none-any.whl, after downloading the necessary packages, I get the following:
Installing collected packages: setuptools, protobuf, tensorflow
Found existing installation: setuptools 19.6.2
Uninstalling setuptools-19.6.2:
Successfully uninstalled setuptools-19.6.2
Rolling back uninstall of setuptools
Exception:
...
AttributeError: _ep_map
During handling of the above exception, another exception occurred:
...
FileNotFoundError: [Errno 2] No such file or directory: '/Users/me/anaconda/lib/python3.5/site-packages/setuptools-19.6.2-py3.5.egg'
I have left out some of the error message to save space.
What is this and, more importantly, what can I do about it?
See the answer here:
Error setuptools when installing tensorflow
In particular, you could try adding the --ignore-installed tag to the end of your pip command.

Resources