Ansible is not installing via PIP [closed] - python

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I was following the tutorial on Ansible docs but was unable to finish it:
$ python -m pip install --user ansible
Returns an error:
/usr/bin/python: No module named pip
While another guide installed it by using python-pip3 and then after running pip3 install --user ansible it was ready to go.
It finishes installation successfully, yet ansible is still not available:
-bash: /usr/bin/ansible: No such file or directory
I have never worked with Python or PIP in the past and I don't understand what could go wrong in the process to start debugging.

You should check your python version in the terminal with
$ which python
command and then this returns a path that contains python(probably this will return a path because almost all of Linux distro contains python). After that result, you could type
$ curl https://bootstrap.pypa.io/get-pip.py
in the terminal, and then type
$ python get-pip.py
pip will be installed after these commands.

I have not found a solution to this but instead I went with the CentOS Epel repository also described in the Ansible docs and it works this way.
sudo yum install epel-release
sudo yum install ansible
Edit: Ok, so all I had to do is to add the following to .bashrc file.
export PATH="$HOME/.local/bin:$PATH"
Fixed.

Related

How do I use pip instead of python3 pip on my MAC? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I have python 3 installed on my mac. I have installed packages via python3 pip install up until now, but if I try to use pip install I'm getting pip not found error. How do I resolve this?
p.s: I just want to install packages via pip install and not python3 -m pip install.
You can set alias in your ~/.bash_profile and try
alias pip=pip3
#or
alias pip=python3 pip
I have found in the end that this is the right way to do it:
https://opensource.com/article/19/5/python-3-default-mac
The actions to take in order to achieve this it's easy.
Take the first 3 steps from the blog.
After that you can install any of versions available from this list, using this command to show it:
pyenv install -l
Why you should do this way requires you to read the entire post.
Change alias in your terminal profile file
if you use bash goto ~/.bashrc file and
alias pip=pip3
if you use zsh goto ~/.zshrc file and do the same
do this on terminal:
alias pip=pip3
or use :
pip3 install <library_name>

Use Python 3 in OpenWRT Build System [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
Trying to create OpenWRT build system for Omega linux on chip device according to manual on my Ubuntu 20. Got error below while run make menuconfig
...
Checking 'python'... failed.
...
Build dependency: Please install Python 2.x
My system has Python 3 while manual asks to install Python 2.
How to solve this problem?
Since Python3 is not backward compatible you need to provide Python2 for installation. Follow this instructions to create an isolated Python2 environment in your system:
Install Python2 (add repository if needed):
sudo apt install python2
Install pip (package manager):
curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py
sudo python2 get-pip.py
Install virtualenv:
sudo apt install virtualenv
Create virtual environment for Python2 in your favorite directory (change myenv to your favorite name):
virtualenv --python=python2 myenv
Activation:
source myenv/bin/activate
Deactivation:
deactivate
You can also install required python packages (if needed) by using pip in your activated environment.

Give sudo permission to all simple pip installed packages [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
On my ubuntu server, some of the installed python packages are simple pip install some are sudo pip install. Is there any way I can give sudo permission to simple pip install?
Note: There is around 250+ package. Installing one by one is quite hectic.
Please help.
Create requirements.txt file through cmd: pip freeze > requirements.txt
it'll list all the python installed packages in you're system to that file. once you got the all packages install using either sudo or normal pip.
with sudo: sudo pip install -r requirements.txt
with out sudo : pip install -r requirements.txt
i hope this will help you.

Fatal Error when launching scrapyd in terminal [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
I just installed scrapyd on Ubuntu 14.04 and after the installation, I simply typed "scrapyd" into the command line and got:
Failed to load application: No module named txweb
I used both the general and Ubuntu specific installations and neither seem to work. Just for some background, I decided to use scrapyd after having created a project that ran multiple spiders but was not able to pipeline the scraped data into two different tables. I looked at some other SO posts like this one, but they seem to be addressing older versions of scrapyd which probably won't be relevant anymore.
Can someone show me how to get started with scrapyd, because the information provided in the docs doesn't seem to be working for me, thanks.
although the docs has apt-get ... pip is the better way to install scrapy (Never failed for me)
sudo pip install scrapyd works for me and then scrapyd doesn't give any errors.
When you install with apt-get - twisted may not be getting installed, but pip takes care of that.
Try uninstalling your apt-get scrapyd first, and then use pip to install it
sudo apt-get purge scrapyd
sudo pip install scrapyd
-------------- UPDATE ------------
Answering your next question in the comment ...
If you want to run scrapyd-deploy you need to also install the package scrapy-client which is not installed along with scrapy. This is mentioned in the docs - http://scrapyd.readthedocs.org/en/latest/deploy.html
You can install it using sudo pip install scrapyd-client

Clean Re-Install of Python on OSX & Linux [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
My various Python upgrades, both Ubuntu and OSX, are so gnarled that I can't escape with virtualenv 'cause virtualenv itself doesn't work. I want to lift off and nuke the site from orbit, it's the only way to be sure.
What is the easiest way to uninstall any upgrades, returning the machines to installed defaults, and proceed forward with 2.7 in a virtual environment?
EDIT: Please to note, I installed 2.7 from source on both systems.
EDIT: I've voted to close -- out of place here, and I've figured out enough to get me through the next thing. Thx to all for reading.
To remove python installed from source:
First try
sudo make uninstall
Last time I checked, Python's source Makefile does not come with an uninstall target, but just in case things have changed, it does not hurt to try this.
Assuming that does not work, install checkinstall:
sudo apt-get install checkinstall # install the checkinstall package
cd /path/to/python/source/
sudo checkinstall -D --fstrans=no make install # make the deb package
This will create a .deb file for all the files installed by make install.
checkinstall will ask a few questions; the default answers should be fine.
You should end up with a deb package called something like Python-2.7.deb
Now you can uninstall python with
sudo dpkg -r Python-2.7 # Change Python2.7 to the name of the deb package.
This method has been known to work, at least for an earlier version of Python.

Categories