Someone please tell me I'm not crazy, becuase I really feel like I am right now.
Ok so, I'm trying to setup a webapp with python and django using heroku, but I've hit quite an odd obstacle.
It wants me to setup a virtualenv using the command $ virtualenv venv --distribute, which is all well and good except:
yeh, so naturally I googled how to install virtualenv and I found this:
But, of course:
So I continued my search by trying to find out how to install pip and I found this:
Aaaaaaand that's when I completely lost my marbles because apparently you need to install pip to install virtualenv to install pip. (maybe not, but that's why I'm a noob and I need help).
But then I took another look at the vitualenv installation guide, and found that I could download it and install it manually, so I extracted all the files from the downloaded archive into my python33 folder and used setup.py install. And I got this:
So I changed the line in that file to except ValueError as e and I got another error from a different python file in that same folder so I reverted the change I made and decided that it probably was not a good idea to meddle with those scripts.
Please, any help at all to do with setting up a free server with python and django would be greatly appreciated. Furthermore, I am sorry if my question is stupid, or incorrectly tagged.
You are following install guides for linux. You should try to find an install guide for pip and virtualenv on windows. First install pip systemwide and then use pip to install virtualenv systemwide. Then start using virtual environments.
Start with How to install pip on W$ and Python and virtualenv on W$. An alternative is the Hitchhiker's guide to python.
Edit
As Ron Elliott states in the comments,
you'll need to point your path to C:\Python2x\Scripts or C:\Python3x\Scripts in order to pick
up easy_install and pip as well as any other script executables
installing to that directory.
But then I took another look at the vitualenv installation guide, and
found that I could download it and install it manually, so I extracted
all the files from the downloaded archive into my python33 folder and
used setup.py install.
You downloaded the package and run setup.py install in wrong folder, that's why it didn't work.
You should:
Download the archive virtualenv-1.10.tar.gz to a Downloads folder (or where ever you want)
Extract it, you will have a folder name virtualenv-1.10
Go to (cd) the extracted folder
Run command: python setup.py install
Anyway I would recommend installing setuptools and pip first, then you can install virtualenv from pip: pip install virtualenv.
Related
Okay, so, I'm running Python 3.4.3 with pip 9.0.1, with the setuptools and wheel.
I'm running this inside JetBrains PyCharm Professional 2017.2.3.
The issue I'm having is trying to install the twitter api packages from this tutorial (ya I'm a n00b) http://wiki.openhatch.org/Twitter
I'm struggling with installing the 4 dependencies mentioned in the first part of the tutorial (httplib2, simplejson, oauth2 and python-twitter)
Honestly, I'm just getting back into programming and this is a project I'd like to complete.
So, I need help with:
Installing pip, and how to use it, and where (python shell or command line or)
the dev.twitter.com website (and where to find what I need from there)
Any help is massively appreciated and sorry if I sound really n00by, but do correct me where I'm using incorrect terms etc because that's how I learn I guess :)
If you haven't got pip installed, find your python installation file.Execute it and choose 'Change Python Installation'. Now choose 'pip' to install and 'add python.exe to path'. Wait for it to finish. Now run windows command line and type:
pip install package_name
Sometimes you may experience that a package isn't available on pip or doesn't work.There are 2 common (not always working) ways to install a package without making pip download the file:
1) A package may be available as a .whl file for download.Download it.Now find it and copy its name .Open a command line in dictionary where it is located and type
pip install **now paste the filename and add .whl**'
2)A package is available as a zip file.Packages are often packed into a zip file.Download the file and extract it.Open a command line in it's directory.You may see setup.py file.Run
python setup.py install
When finished installing pip and adding python to path,you can run:
pip install httplib2 simplejson oauth2 python-twitter
Done.
Once you have pip installed, open the command prompt and just type pip install name_of_the_extension.
In this case, pip install httplib2 will install this package.
I believe you have pip installed on your computer, so it shouldn't be a problem to install the 4 packages you need.
I'm really struggling at installing any python modules (e.g six, yahoo_finance) because they require pip to be installed, but I don't know whether I have pip already or how to install it. Once its installed I don't know what command to type in and where to type it in. Can I install these modules any other way without pip?
I am only a beginner, so sorry if this is a bit basic.
Thanks in advance
pip comes already bundled with python 3.4 It will be in your scripts directory C:\Python34\Scripts\
Add it to your Environment variables and you can run it from any directory or else open the directory mentioned above in command prompt and run pip install ... to install whatever you want
First, make sure you have it installed, if not follow the instructions below. Type which pip, and if it doesn't list an URL, it means it's not installed yet.
Go here https://bootstrap.pypa.io/get-pip.py and download the file.
Then open terminal and go to your downloads folder (or wherever you downloaded it to) and type python get-pip.py to execute the script. If you get an error that says OSError: Permission Denied, or something similar, run it with administrator permissions.
If the installation is successful, you should now have pip installed on your computer. Type pip --version to make sure you have it installed.
To install six and yahoo_finance, type:
pip install six
and
pip install yahoo-finance
If something goes wrong update your question.
From Installing Python Modules:
pip is the preferred installer program. Starting with Python 3.4, it is included by default with the Python binary installers.
Emphasis mine
If you already installed it by default you should be able to use it.
Just open the command line and type python -m pip install SomePackage.
sorry for asking a probalby stupid question, however, I am completely new to setting up/installing python packages, i.e. I have never done it.
So far I installed anaconda3 and worked with the pre installed packages. Now I need the google api pyhon client.
I do not even know whether pip is installed in the anaconda package but I assume it.
What have I tried so far:
In Windows cmd:
1. pip install --upgrade google-api-python-client
2. pip install -- proxy="XXX.XXX.XX.X:XX" -- upgrade google-api-python-client
3. export https_proxy="...."
pip install --upgrade google-api-python-client
I get the following errors:
cannot fetch index base url https://pypi.python.org/simple
unknown command
unknown command
In addition I tried to download the google_api_python_client and unzipped it.
However, I do not know how to proceed here.
BTW: Here in my company we are still on XP
Any help would be highly appreciated!
THANK YOU
Would like to add to the answer by #alok-nayak that you should use the following:
python setup.py install
Leads to:
Installed ~/anaconda/lib/python2.7/site-packages/google_api_python_client-1.4.2-py2.7.egg
After unzipping google_api_python_client. You should run the setup.py file
python setup.py
Also you can edit ".condarc" file in your home folder, as explained here http://conda.pydata.org/docs/config.html . enter your proxy details there
Is it possible to collect many Python extensions an install them in one step? I have a Python build environment for an open source project that often needs to be recreated on multiple machine. It's a pain to double click through a bunch of python extension exes every time we need to do this.
Ideally I'd like to package a complete build environment, Python, extensions, system environment variables, and all, into a one step install process. But a single step extension install would also be helpful. Is this possible?
Yes, you can do that... do you have pip(python indexed package) installed in your system?
if not, then install it... and put all the extensions into a single text file... say requirements.txt...
This is done by running
pip freeze > requirements.txt
then by using pip you can install it... by using this command...
pip install -r requirements.txt...
it will install all the extensions mentioned in the file...
you can find the pip package here pip
might help you...
You can with Distribute define dependencies of a package, and easy_install or pip will install all dependencies when you ask to install the package.
I am trying to install easy_install in order to use BeautifulSoup... However I have no clue what my PATH directory is... when I run easy_install BeautifulSoup.. I get
error: Not a recognized archive type: C:\docume~1\tom\locals~1\temp\weasy_install-w6haxs\BeautifulSoup-3.2.1.tar.gz
I am guessing this has something to do with the PATH that is not set up right in Environment Varibales..... But I have no clue what my Path should be...
Any help would be appreciated... I am very new to all of this so speaking english rather than programming would be appreciated lol..
Install beautifulsoup is exactly what I did yesterday. These steps work for my windows 64:
Download and run ez_setup.py at
http://peak.telecommunity.com/dist/ez_setup.py
This will install easy_install.exe to python scripts directory. For me it is C:/python26/scripts
CD to C:/python26/scripts
Run easy_install.exe pip
This will install pip.
Then run pip install beautifulsoup4 to get beautiful soup.
Be sure to allow these tools access to the Internet in your firewall program.
Try install a binary version:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#Base
and there are lots of binary packages~ choose the suitable version and type for you.
I'd Try to download the source .py files, find the setup.py files and run in command line: <path_to_source_archive>\setup.py install
this usually works when easy_install stutters.