pip install returns nothing in command line - python-2.7

I am setting up a Windows 10 machine. After installing python 2.7.10 I tried to install some libraries, but when I do
pip install grpcio
The command prompt returns nothing. I added --verbose and the execution terminates after printing
Starting new HTTPS connection (1): pypi.python.org
I tried to update pip using pip install --upgrade pip but I get exactly the same error. Also tried to execute get-pip but this is what I get
1 location(s) to search for versions of pip:
* https://pypi.org/simple/pip/
Fetching project page and analyzing links: https://pypi.org/simple/pip/
Getting page https://pypi.org/simple/pip/
Found index url https://pypi.org/simple
Looking up "https://pypi.org/simple/pip/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
The problem is pretty much the same with easy_install.
I have connection to internet, pip is in Scripts folder and PATH contains the path to python2.7. --no-cache-data does not work. Do you have any ideas of what's wrong?

The problem was my Python installation. Had to do a nuclear uninstallation and then install again.

Related

how to install pip remotely using ssh

Hi I hope someone can point me in the right direction.
I am trying to upload a django project which I have developed locally on my machine and now moved the project files to a server and am trying to install django on the server.
I have Python 2.7.5 installed and accessed the server remotely using ssh (putty) I can confirm Python is installed by running the command python --version
I don't have pip installed as when i run the command pip --version
I get following notification
-bash: pip: command not found
I am new to django and python so not sure what I should do to install both django and pip.
p.s In my requirements file and when working locally I have pip and django installed correctly and all working.
Ok, lets say you are already on your remote server. First thing to do is to install pip for your version of python. You can do this via:
sudo apt-get install python-pip
From now you have pip installed. Next thing to do is to install django globally in your system:
pip install django==1.11
Please note that django 1.11 is the last version that supports
python2
Next thing to do is to create django app:
django-admin startproject test_project
And the last thing is to install virtualenv
To install libraries for each of your django projects and keep them
separate
pip install virtualenv
Also note
If you have requirements.txt file with all libs, you can do something like this on your remote server:
pip install -r requirements.txt
That will automatically install all libraries at once
First you should understand which OS you're running:
uname -a
and:
lsb_release -a
When you find the OS version, you can easily follow this guide:
https://packaging.python.org/guides/installing-using-linux-tools/#installing-pip-setuptools-wheel-with-linux-package-managers

tightVNC connection from python2.7 error --No connection could be made because the target machine actively refused it

I have installed vncdotool on my python2.7
Download and install python-2.7.5.exe from the Python Downloads website
Open up Powershell, and paste in the following:
Restart your Windows Machine
Upon Restart, go to the Twisted Downloads and get and install 32bit Twisted, Twisted-13.1.0.win32-py2.7.exe
Download and install PIL-1.1.7.win32-py2.7.exe, from PIL Downloads.
Download ez_setup.py and get_pip.py and save them to your Python/Scripts folder, C:\Python27\Scripts
Open up Powershell and type the following:
pip install pip --upgrade
pip install distribute
pip install setuptools --upgrade
pip install Twisted --upgrade
pip install vncdotool < -- Finally install vncdotool
At a Powershell prompt:
vncdo.exe --server 192.168.2.2 type "Hello World"
i tried above follow.
now i got error
like this.
c:\Python27\Scripts>vncdo.exe --server 192.168.2.11 type "hello world"
CRITICAL:root:Connection was refused by other side: 10061: No connection could be made because the target machine actively refused it..
Please help me to solve this problem. Thanks.
Your code has not problem.
May be problem is firewall or antivirus or server will sent your set rather than ack.

Failed building wheel for python-ldap (windows) *first stackoverflow ask*

I've installed flask, flask_login, and ldap in the virtualenv for my flask package (to authenticate ldap users with the usernames & passwords of the other users at my company).
When I run my flask app, I get "AttributeError: 'module' object has no attribute 'initialize'"
I'm tried "pip install python-ldap"
but I get a red error (sandwiched between other white text) that reads:
"Failed building wheel for python-ldap"
I have thoroughly examined these:
How to install python-ldap on a python 2.7 virtualenv on windows without compiling
Installing python-ldap in a virtualenv on Windows
https://www.python-ldap.org/docs.html
https://www.linuxjournal.com/article/6988?page=0,1
to no avail.
I've had this error for days now...
(also:
pip install openldap
gives:
Collecting openldap
Could not find a version that satisfies the requirement openldap (from versions: )
No matching distribution found for openldap
...(in and outside of my venv) if that information helps)
I had this error last week and after switching work computers, I recreated the virtualenv and installed all of the other packages and dependencies successfully.
my requirements.txt file contains these lines after a line of git stuff:
click==6.7
Flask==0.12.2
Flask-Login==0.4.0
itsdangerous==0.24
Jinja2==2.9.6
ldap==1.0.2
ldap3==2.2.4
MarkupSafe==1.0
pyasn1==0.2.3
Werkzeug==0.12.2
Has anyone successfully installed python-ldap into a flask virtualenv with windows? If so... how?!
Go to:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-ldap
download python_ldap-2.4.38-cp27-cp27m-win_amd64.whl in the same directory that your venv folder is listed under
(ex.)
/myrepo
/myapp
/myapp
/venv
/run.py
/python_ldap-2.4.38-cp27-cp27m-win_amd64.whl
install the .whl file while inside of your venv
venv\Scripts\activate
pip install python_ldap-2.4.38-cp27-cp27m-win_amd64.whl
Voila!
The error
ERROR: Failed building wheel for python-ldap
can occur for several reasons. You actually have to look at what happened above this line. In my case, I just had to install missing dependencies to build python-ldap. You can look them up here. For CentOS 8, I had to install:
sudo dnf install openldap-devel python3-devel gcc
to make
python3 -m pip install --user python-ldap -U
work.

Unable to get these to cooperate: mysql-python + virtualenv + percona + centos6

I've gone through many threads related to installing mysql-python in a virtualenv, including those specific to users of Percona. None have solved my problem thus far.
With Percona, it is normal to get a long error on pip install MySQL-python in the virtualenv that ultimately says EnvironmentError: mysql_config not found. One method to remedy this is yum install mysql-devel, which I've done. I can actually get mysql-python to install properly outside of the virtualenv via yum.
I'm getting the error in the virtualenv only - it uses Python 2.7.9, wheareas 2.6.6 is what comes with Centos.
Also, with MySQL-python installed via yum it will import to the OS's python interpreter, but will not import into the virtualenv's python interpreter.
To clarify, I only installed mysql-python via yum to see whether or not it would work that way. I would prefer it be by pip, in the environment only.
What am I missing here? As far as I'm aware it should work - considering it will work outside of virtualenv.
Found the solution!
I think it was improper of my to install mysql-devel in the first place, so I went ahead and uninstalled it.
Instead, I used a packaged supplied by Percona - Percona-Server-devel-55
yum install Percona-Server-devel-55 and the problem is solved!

Python pip is not working and giving exception urlopen error [Error 10051]

I am setting up an environment with Python 2.7 (32 bit) on a Windows XP 32 bit computer.
Python 2.7 installed smoothly (I used the Windows installer). After this I have installed setuptools (also using the Windows installer) and subsequently installed pip (I unpacked the pip tar file into a directory, and ran python setup.py install).
I have also installed Apache and mod_wsgi, configured them and wrote a simple page in Python, which is displayed correctly by the web server.
So far so good. Now I want to install virtualenvwrapper-win using pip. Since I am behind a proxy, I used --proxy. My command line looks like this:
pip install --verbose --proxy myproxy --use-mirrors --timeout 240 --download D:\cache virtualenvwrapper-win
Here I have the same error message many times:
Could not fetch URL http://c.pypi.python.org/simple/virtualenvwrapper-win/: <urlopen error [Errno 10051] A socket operation was attempted to an unreachable network.>
and finally:
DistributionNotFound: No distributions at all found for virtualenvwrapper-win
After spending 4 hours trying to solve this I have no clue as to how to continue.
Note that the very same steps with Python 2.7 64 bit gave no problem at all (I got virtualenv running within minutes). The reason why I am using Python 32 bit can be found here in section Windows Binary Downloads.
Any hint to what is going wrong with pip install would be much appreciated.
Try using the -r option with https://crate.io. Crate is a fantastic website which mirrors PyPI as well and is very reliable. It syncs every 2 minutes with PyPI so it should be up-to-date unless you just released a package.