I am getting
could not resolve host :bootstrap.pypa.io
error when trying to install virtualenv
I am trying to come up with a Django project, I have python 3 in my Mac and I need to use virtualenv for creating a virtual environment, I used pip install virtualenv to install virtual env but I got an error
Could not find a version that satisfies the requirement virtualenv (from versions: ) No matching distribution found for virtualenv
I found a solution for this in Stack Overflow here which was to update pip using
curl https://bootstrap.pypa.io/get-pip.py | sudo python
but I am getting
could not resolve host :bootstrap.pypa.io
error can some one suggest me what needs to be done to successfully install virtualenv.
Related
I have created an lambda with python which I am now trying to push to the cloud by using "amplify push".
Originally I got two errors, but I solved one by installing pipenv. The second error is:
You must have virtualenv installed and available on your PATH as "venv". It can be installed by running "pip3 install venv".
But when I am trying to run that command I get:
ERROR: Could not find a version that satisfies the requirement venv (from versions: none)
ERROR: No matching distribution found for venv
From what I can see I already have virtualenv installed as I can run " py -m venv"
How do I add it to my path as venv? I have tried to do it by creating a Function in Powershell but it didn't work when running "amplify push"
It was solved by reinstalling virtualenv:
pip uninstall virtualenv
pip install virtualenv
I have been following this tutorial (https://tutorial.djangogirls.org/en/django_installation/) to learn some python but I have become stuck at the 'Django installation' step. I have managed to create a virtual environment and the .txt file but trying
(myvenv) (base) PS C:\users\JD\djangogirls> pip install -r requirements.txt
I get the error 'could not find version that satisfies requirement'and'no matching distribution found'. This error occurs when I have entered versions 2.2.4 & 3.0.5 of Django into the .txt file.
Have also just tried 'pip install django' and have come across the same errors.
Have tried in the windows command prompt but i get an error stating pip is not recognized as an internal or external command.
I have python 3.7.6 installed.
Any help is very much appreciated
After enabling your virtualenv follow to following code
pip install django==2.2.2
Add django==2.2.2 in requirements.txt
pip install -r reqirements.txt
I'm new to using virtualenv and I'm having trouble installing MySQLdb on my virtualenv.
I'm currently using Python 2.7 and here is what my current virtualenv looks like
click==6.7
Flask==1.0.2
Flask-SQLAlchemy==2.3.2
itsdangerous==0.24
Jinja2==2.10
MarkupSafe==1.0
MySQL-python==1.2.5
mysqlclient==1.3.12
SQLAlchemy==1.2.8
Werkzeug==0.14.1
I first saw this error when I was coding on my normal machine (Mac 10.13), and when I initially tried to install MySQLdb, I got this error.
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-install-rxnRuR/MySQL-python/
I was able to fix it by using the second solution in this question
However, when I start up my virtual environment and attempt to install MySQLdb I get the same error code as above, but I do not have the same directories that are provided in the solution I originally found.
I've tried to piece together solutions from the follow questions trying to see if there is a solution for installing MySQLdb in virtualenv
Link1, Link2, Link3, but none of them seem to work
I was hoping someone might be able to explain what's going on so that I work with MySQLdb in a virtual environment.
Commands tried:
sudo pip install --upgrade setuptools
brew install mysql
brew install mysql-python
brew uninstall mysql
brew install mysql-connector-c
brew unlink mysql-connector-c
brew install mysql
pip install mysql-python
UPDATE: This seems to be a known issue and is in a Github thread I ended up solving the above error code using the solution found here, but now when I start up Python and I try to import MySQLdb, I get the following error code
Reason: image not found
Try this :
brew uninstall mysql-connector-c
brew install mysql
invoke "mysql_config --libs" and confirm its output include correct library options: "-L/usr/local/Cellar/mysql/5.7.20/lib -lmysqlclient -lssl -lcrypto"
export LDFLAGS=-L/usr/local/opt/openssl/lib && pip install mysqlclient
I hope this helps
The answer in this other question solved the problem, below is the command I used to make it work.
export DYLD_FALLBACK_LIBRARY_PATH=/anaconda2/lib/:$DYLD_FALLBACK_LIBRARY_PATH
A few notes however...
I had to run this command WITHIN my virtual environment for it to work, not my global environment
I was told this is a problem with Anaconda managing my packages and my virtual environment variables not being able to find the correct paths
You'll notice that my folder is "~/anaconda2/..." check to see where your lib files are installed on your global environment and make sure you adjust the directory name accordingly
Also I was suggested to keep this command in an initialization file for my virtual environment, that way whenever my virtual environment loads, this command is already executed
I have got a problem with install python on my OVH vps server kubuntu 14.04 desktop. What i need to do ?
:~/Desktop# python get-pip.py
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting pip
Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement pip (from versions: )
No matching distribution found for pip
Calling more attention to #Arduino_Sentinel 's comment
Sounds like you installed Python by running make, right ? In that case I'd recommend installing libssl-dev and rebuilding+reinstalling Python
On a fresh debian installation, I had installed Python 3.6 via
wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tgz
tar xvf Python-3.6.3.tgz
cd Python-3.6.3
./configure
make
make altinstall
creating a virtualenv with virtualenv -p python3.6 env and subsequently trying to install anything with env/bin/pip would produce the errors from the question.
The comment quoted above solved the issue on my server.
The main problem is you compiling python before install the libssl.
You should trying installing form your packages repos
sudo apt-get install python-pip
please tell me some way to install Django in ubuntu in virtualenv without using pip for python 2.7
I am using a proxy connection. I have tried the steps shown in other answers for exporting proxy for pip .
when I try pip install Django==1.6.2 it shows error
Downloading/unpacking Django
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement Django
Cleaning up...
No distributions at all found for Django
Storing debug log for failure in /home/shivam/.pip/pip.log
Also , I am unable to install anything using pip.
If your using pip 1.5.4, you should read this topic : pip connection failure: cannot fetch index base URL http://pypi.python.org/simple/. So, you should upgrade pip in your virtualenv: pip install --upgrade pip (see https://pip.pypa.io/en/stable/installing/#upgrading-pip).