I am attempting to install forex-python. I have attempted to find a meaningful answer to this question everywhere, however my search has been in vain. Now, the Python Software Foundation's instructions are to pip install it. I am currently using Python V3.6.1 and the Foundation states that versions 3.4 or greater have pip installed directly into them. I am using the executable installer of v3.6.1.
My question is this: where do you pip install this package on Windows? I attempted to install the package in the python command prompt, tagged Python 3.6(64 bit), using the statement
pip install forex-python
though it resulted in a syntax error.
Is the module supposed to be installed on the Python interpreter? Since I am using Windows Vista, what is the Windows version of a terminal? I am unaccustomed to a Windows operating system on a Toshiba computer and I am more familiar with Mac OS X. If there is a version, what is it called and how do I find it? And if it is supposed to be installed on the Python interpreter, why does it give a syntax error when I enter the statement?
When I asked for help, it stated all information about pip, however it did not state how to install forex-python.
I currently have forex-python downloaded on this computer, symbolized by the logo of three books. It is complete with the code, readmes and files, however, I do not know how to install it for usage in IDLE programs, like my currency converter.
I would be very grateful for any help on this subject.
you can try
pip install forex-python
or
pip install git+https://github.com/MicroPyramid/forex-python.git
then you can check the installation through
pip freeze
if it is listed in it then it is installed
Related
This is probably a really dumb question but I am stuck and wasting too much time on this so I would SO appreciate any help.
I am using a RHEL 7 box and installed Apache Zeppelin on it. Everything works except for the life of me I can't import Python packages such as Pandas.
I realized I didn't have PIP so I installed it with these steps: https://pip.pypa.io/en/stable/installing/ (notice I had to use the "--user" argument for the command "python get-pip.py").
Finally, I did "pip install pandas --user" which worked perfectly. I then go into my Zeppelin notebook and I cannot import pandas, even after restarting the Python interpreter.
I did some research and I think the problem is that "which python" and "which pip" are installed in different directories as the former results in "/usr/bin/python" while the latter in "~/.local/bin/pip".
So I suspect the packages installed with pip are basically getting loaded into a different version of python? If it helps, when I do "whereis python" I get 5 different results such as "/usr/bin/python" and "/usr/bin/python2.7" etc.
First thing to understand is: Python packages aren't installed globally, every installed Python has its own set of packages. BTW, pip being a Python package with a script is also not global. If you have a few different pythons you need different pips for them. I don't know Apache Zeppelin so I cannot guess if it uses the system Python (/usr/bin/python) or has its own Python; in the latter case you need to install pip specifically for Zeppelin so its pip install packages available for Zeppelin.
To investigate to what Python pip installs packages you need to find out under what python it runs. Start with shebang:
head -1 `which pip`
The command will prints something like ~/.local/bin/python. If it's not the version of Python you need to install packages for you need to install a different pip using that Python.
The most complex case would be if the shebang is PATH-dependent, something like #!/usr/bin/env python. In that case pip runs Python that you can find with which python.
PS. AFAIK the simplest way to install pip at RedHat is dnf install python-pip.
phd's answer was very helpful but I found that it was just a matter of using the root account to install the python packages. Then my Zeppelin was able to see any packages.
I do not understand exactly what I should do to install Matplotlib. I read a lot of posts but I do not have so much of fluent knowledge in programming so basically all of this that i read is quite confusing. Does anyone know what exactly should be done when having Python 3.6., visual code studio and Windows 8 to install Matplotlib?
A way that is simple using the original python from python.org with PATH installed is to use pip. You can check by opening cmd and entering python. If it is not a recognised command then you will have to reinstall python but make sure to tick the box at the start to enable PATH. once this is done you can install packages such as numpy and matplotlib.
In cmd type pip install Then the package you want to install from the PyPI website and using the EXACT name in the url before the version number. It should be like: /PACKAGE/VERSION.
eg. for matplotlib the url is /matplotlib/VERSION, so the name would be matplotlib. To install the latest version pip install matplotlib
If for some reason you want to uninstall a package you would do: pip uninstall PACKAGE. To install a specific version use pip install PACKAGE==VERSION where VERSION is the exact version name in the url. For full documentation visit Packaging Help.
Visual code studio is not necessary in this situation. This question is too broad and asking for a recommendation on software. Because of this, I went with the original python installation way and not any 3rd party software.
I want to install Scrapy on my Mac. I am a complete Python newcomer. I know Mac OS X comes pre-installed with a version of Python. However, best practice (I followed this video), including Scrapy's own advice, appears to recommend installing a "proper" version that does not conflict.
I used "brew install python". This installed Python 2.7.12.
I also used "brew install python3". This installed Python 3.5.2.
OS X appeared to ship with 2.7.6.
I added "export PATH=/usr/local/share/python3:$PATH" to the path, to ensure shells start with Python 3.
Current path is "/usr/local/share/python3:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
I believe the second path is the 2.X one I installed myself.
Now that it comes to installing Scrapy, I am confused. Scrapy install documentation says to use "pip install Scrapy". However, I'm not sure whether this will run pip for the pre-installed Python, my new 2.X Python or my new 3.X Python.
Should I run "pip install Scrapy" or "pip3 install Scrapy"? My instinct says the former.
I am trying to install Pygame for Python 3.5.1, but it tells me to upgrade to the new version of pip. "You are currently using 7.1.2, use 8.1.2".
Here is a screen shot of it:
The error clearly states Access Denied.
Try to run cmd/powershell as administrator.
The installation error is not because of pip , though you should still upgrade pip
python -m pip install --upgrade pip
Pygame does not have python3.5 support yet. Check the binaries here
Pygame binaries
Try to use Python version 3.4 or 2.7 and then install pygame.
EDIT
You can find unofficial pygame binaries for several Python versions including Python3.5 here.
So if you do not find the official binary, you could try the appropriate file from the above link.
Note: The binaries given there are whl files. So you need to install them using pip.
Example: Assuming you have 32-bit Python installation, run pip install pygame-1.9.2b1-cp35-cp35m-win32.whl
See this answer for more detailed instructions.
Pip seems to be having a permission problem creating this directory: c:\program files (x86)\python35-32\Lib\site-packages\pygame
Here are some things you can try:
Navigate to that directory and see if it already exists. If it does exist, then try deleting it.
Try running pip as an administrator. Right click the command prompt icon and select run as administrator. Your path variables might not be set for the administrator, so you many need to give the full path for pip. In your python folder, it should be in a folder called scripts.
Since you're using Windows, you can also try the binary installers here: http://www.pygame.org/download.shtml
If nothing works you can try installing a different version of Python. I use Python 2.7.8 with pygame.
It was a problem based on the admin command run program and I figures it out.
I am trying to install pandas via pip install pandas but when I do, I get the error:
Command python setup.py egg_info failed with error code 1 in
c:\users[username]\appdata\local\temp\pip_build_[username]\pandas
I followed the answer given here and installed ez_setup.py without incident, but still get the error when doing pip install pandas.
Thanks for any help, if I can provide more information please let me know.
The easiest way to install pandas and its dependencies on Windows is to download the relevant packages from Christoph Gohlke's Python Extension Packages for Windows repository. You'll find the files for pandas here as well as a list of other required dependencies.
On Linux (Debian / Ubuntu varieties), when NOT installing inside a virtual environment, but in the main system, I find it best to just use the Synaptic Package Manager (because even the --user switch seems to fail when trying to install pandas without sudo). Search for pandas inside Synaptic PM. There's varieties for python 2 and 3.
However, on linux, I have generally found the cleanest, easiest, and overall safest approach to be creating virtual environments and then use pip install <package name> inside the virtual environment. I believe this would be best on Windows too.
I installed Pandas package following procedure listed after the following disclaimer section:
Disclaimer:
- I don't consider myself a computer expert so follow the instructions at your own risk.
- My procedure worked on my windows computer
- My windows computer has python 2.7 installed from python.org
- My python GUI is IDLE
- I don't recall installing pip, it is possible that it installs at the time of installing python 2.7 from python.org (not sure)
- The directory in which my pip.exe is located is under C:\Python27\Scripts
Procedure:
Open a command window for the directory under which you have pip.exe, (in my case is Scripts). The prompt looks like this in my case: C:\Python27\Scripts>
At the prompt type pip install pandas. The prompt looks like this in my case: C:\Python27\Scripts>pip install pandas
Press ENTER key. You should see message: "Collecting pandas" being displayed in the command window.
Once the system completes collecting pandas, you should see message "Successfully installed pandas-0.22.0" , or similar depending on version collected.
Picture shows steps 1 -4 as shown in my computer command window.collecting_pandas