I installed pip but if i try to install a package with
I m new to linux and i have no idea how to figure out where the problem is.
6 Answers 6
My situation is that the python3 works fine, but pip3 does not work (the default python version is python2.7, but it doesn’t matter). I solve this problem by the following command:
And if you are not the root user, you may need to add sudo in the beginning of the command. Hope it can help.
Pip is a python packaging module that helps us too install python libraries. To install python libraries/modules ,you need to install pip-
My OpenSuse box at work did not have pip installed and yast did not find it. I figured out that yast was only pointing to a local package-repository which apparently was missing pip. I have added the official OpenSuse repository, which I found here https://en.opensuse.org/Package_repositories and then was able to find and install pip.
I had to do something similar, tom’s answer didn’t quite work on Digital Ocean, Ubuntu 14.04.05
See if the package is installed in the site-packages of your python version.
Gives the path where all your packages reside for particular python version. import sys, os; print os.sep.join([sys.prefix, ‘lib’, ‘python’ + sys.version[:3], ‘site-packages’]) ;
if you find requests there , then import requests should work. Otherwise add the above path to your python’s path by using the below code.
I am installing Intel OpenVINO Toolkit in which I configure the model optimizer.
I have tried many things, so how can I solve it?
2 Answers 2
Create a symbolic link at /usr/local/bin/python3/pip which references to file /usr/local/bin/pip2.7 .
Then change directories to
/intel/computer_vision_sdk_2018.3.343/deployment_tools/model_optimizer/install_prerequisites and run sudo ./install_prerequisites.sh
Because you have python3-pip package installed, you need to invoke that as pip3 :
Copy link Quote reply
jiahui-z commented Mar 6, 2018
When I open the terminal, it will always show the following error message:
If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is
-bash: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] . ]
-bash: complete: -D: invalid option
complete: usage: complete [-abcdefgjksuv] [-pr] [-o option] [-A action] [-G globpat] [-W wordlist] [-P prefix] [-S suffix] [-X filterpat] [-F function] [-C command] [name . ]
-bash: /Users/zjh/.venvburrito/bin/virtualenvwrapper.sh: No such file or directory
/usr/bin/python: No module named virtualenvwrapper
virtualenvwrapper.sh: There was a problem running the initialization hooks.
The post on StackOverflow doesn’t help. Could you please help me solve this problem? Thanks!