Cannot seem to install pandas for python 2.7 on windows - python

Sorry if this has been answered somewhere already, I couldn't find the answer.
I have installed python 2.7.3 onto a windows 7 computer. I then downloaded the pandas-0.10.1.win-amd64-py2.7.exe and tried to install it. I have gotten past the first window, but then it states "Python 2.7 is required, which was not found in the registry".
I then get the option to put the path in to find python, but I cannot get it to work.
How would I fix this? Sorry for the silly question.
Thanks.
~Kututo

I faced the same issue. Here is what worked
Changed to PATH to include C:\Python27;C:\Python27\Lib\site-packages\;C:\Python27\Scripts\;
uninstall 64bit numpy and pandas
install 32win 2.7 numpy and pandas
I had to also install dateutil and pytz
pandas and numpy work import work fine

After you have installed python check to see if the appropriate path variables are set by typing the following at the command line:
echo %PATH%
if you do not see something like:
C:\Python27;C:\Python27\Scripts
on the output (probably with lots of other paths) then type this:
set PATH=%PATH%;C:\\Python27\\;C:\\Python27\Scripts
Then try installing the 32-bit pandas executable.

You should try the anaconda distribution for windows. Is free, comes with all the package you will ever need, and one click installation.
http://continuum.io/downloads.html

Related

So i installed numpy . But when i call it in a program an error occurs. Any method to solve it permanently in windows 10

Here is the error
import numpy
Exception has occurred: ModuleNotFoundError
No module named 'numpy'
File "C:\path\to\file\32.py", line 1, in <module>
import numpy
Let me know how did you install the NumPy package; using pip or something else?
If you have multiple python versions, i.e. 2.x and 3.x at the same time, please make sure your interpreter for the 32.py file is the version that you installed NumPy on.
To possibly fix your problem, you should first try installing it and see if there are any errors. You should also check the version of Python you are running on Windows 10, because when you update Python it sometimes switches names between py and python
As you can see, the version of Python has changed between py and python so you should try changing that first.
If this does not work, you should try finding the directory for NumPy and adding it to the system PATH in your script. The installer usually shows you the location by doing the following:
import sys
sys.path.append("<insert numpy location here>")
import NumPy
This should manually force it into finding the package. If none of this works, please tell us and we should be able to find a different solution.
Happy Coding!
If you're using a code editor like PyCharm, you could install it by clicking on
file then settings then the project interpreter setting and install new module! You can search for the module and install.
Make sure that the python version that you want to use is a Windows Environmental Variable. You can test this by running this line in your command line.
> python --version
If you get some other python version that is not the one that you wish to use you can set the python version you want by finding where exactly your Python folder is located and go into settings and set the path as a new variable (I can leave a tutorial for you). If that is too much of a hassle, the Python installers can set the python that you will install as an environmental variable for you. (You could uninstall and reinstall and make sure that you allow it to make it an environmental variable.
After that you should be able to import whatever external packages you want using pip
for example:
pip install numpy

Installed Pandas but Python still can't find module

I've tried installing Pandas in many different ways. Currently, it is installed using Anaconda and I have created a virtual environment. Below it shows that Pandas is installed, yet the module still can't be detected. Sorry if this has been answered before. I am still a beginner with Python.
Picture of current Terminal
maybe it doesn't match with the version you use which version you use?You can find it by pressing python in a terminal.Maybe you dont find it in the version you are using!

Python install pandas

I am running Os X 10.11.3 and I am having trouble installing pandas. I have two Anaconda environments installed (3.5 and 2.7), and I code using CodeRunner. I have searched through all the forums and tried the suggested advice, but nothing seems to work.
When I type
conda list
in terminal, it shows that pandas is installed, but when I try to import into CodeRunner, it returns with ImportError: No module named pandas. Note that importing numpy succeeds without problem.
I also have
#!/Users/username/anaconda/bin/python
at the top of .py files in CodeRunner. This is the directory that is outputted in terminal when I type which python. By default, CodeRunner had
#!/usr/bin/python
I am not 100% sure what difference this makes
Given that /Users/brendan/anaconda/bin is the path to your Python executable, try this in your Bash prompt and see what happens:
/Users/brendan/anaconda/bin/python -m pip install pandas
Yeah, I know this is very late, but if anyone finds this, maybe this will help...
Coderunner is running the built in python (/usr/bin/python), not one of the anaconda versions with pandas. In Coderunner "Run settings", you will see that it runs "python $filename", which take precedence over what you have on the first line of the file. (On my mac (10.13), python has NumPy but not pandas, )
Maybe it is as easy as changing Coderunner "Run setting" python to /Users/username/anaconda/bin/python.

Numpy not installing, also "Can't find a usable init.tcl in the following directories:"

I am trying to start the newcoder.io data vizualization tutorial but am having a difficult time installing numpy on Windows (8.1, python 2.7).
When I go to install it using pip the process never completes, even if I leave it for an hour or more. It doesn't give me any errors or anything either so I don't know how to track down what is causing this.
Here is what is looks like:
(datavizproj)PS C:\Users\Ray\github\new-coder\dataviz> pip install numpy
Collecting numpy
Using cached numpy-1.9.2.tar.gz
Installing collected packages: numpy
Running setup.py install for numpy
Any thoughts on what to do? Should I delete the cached file and have it redownload it? I looked in Python27/lib/site-packages and didn't even see numpy and I thought that is where the file should be kept after pip finds them.
EDIT: I added "Can't find a usable init.tcl in the following
directories:" to the title to help anyone else who has this separate problem find the solution posted below.
Numpy is implemented in C and thus requires a C compiler to install. To circumvent the issue, use a precompiled installer from the Source Forge page here. Then try to import to verify the installation.
import numpy # see whether it's been installed
I was able to track down my issue (thanks Malik Brahimi, you led me on the right track to figure this out)
My issue was that I installed the 64bit version of Python, and pip can't install a 64 bit version of numpy because there is no official source.
My solution was to remove python and reinstall a 32 bit version as I don't actually need 64bit and apparently there is better compatibility for modules using 32bit.
I came to another problem later on, where the init.tcl file could not be found when I was running a program that use matplotlib. Python was searching for the init.tcl in python27/bin/tcl8.5 but the correct directory is python27/tcl/tcl8.5 . To fix this I added 2 system variables: TCL_LIBRARY, with the path C:/Python27/tcl/tcl8.5 and TK_LIBRARY, with the path C:/Python27/tcl/tk8.5
you may want to retry using easy_install?
Otherwise, try deleting any cached items.

MySQLdb installation on Windows 7

I am running python 2.7 in windows 7. I'd like to link up to mysql and found MySQLdb. I have tried easy_install mysql-python and found the /Z1 error. Although I downloaded the source, I'd like to avoid having to make all the changes to avoid the Z1 error (due to the source expecting the VC compiler that i don't have). i downloaded the 1.2.4 binary and installed. however, when i start up python and try "import MySQLdb", it does not find it.
i have looked at many pages. i am sure that i am overlooking something obvious, but i am new to python and i've run around in circles at so many pages.
please help.
edit: the installation actually worked. the problem is that i must have installed a 32 bit version. it works fine in IDLE which is using python 2.7.3 32 bit. but i was trying to use ipython and spyder, both were set up as 64.
i tried to install "unofficial version" from http://www.lfd.uci.edu/~gohlke/pythonlibs/ which i got from Python: How to install mysqldb on windows 7 x64?. it claims python 2.7 is not in registry. any help here would be welcome.
I did not solve the /Z1 issue. However, i did determine what i did wrong with the binary install. i had included /python27/LIB/site-packages/MySQLdb only. once i also added /python27/LIB/site-packages/MySQL_python.1.2.4b4-py2.7.egg-info it worked. i did not verify whether i need both in the pythonpath or not. but having both does work.

Categories

Resources