Installing Python Pandas - python

I am currently using Linux Ubuntu 16.04 and python as the language. I am trying to convert an XLSX file to pdf and I came across this question with answer. Python - Converting XLSX to PDF.
One of the answer requires me to install pandas and also wkhtmltopdf and use them to convert the files into pdf format.
I tried installing pandas but after installing pandas, I am face with builtins.ImportError: No module named 'pandas'.
So far I have tried this solution but it did not work for me.
ImportError: No module named pandas
Is it possible for me not to also install Anaconda to help me.
Can someone guide me through this.
Thanks!

If you are using PyCharm IDE, you can try:
Settings => Project Interpreter => plus button => search package to install

Related

'reportMissingModuleSource' and 'reportMissingImports' errors for imported modules pandas and alpha_vantage

I'm very new to python and trying one of my first projects. I have installed modules 'pandas' and 'alpha_vantage' and imported them at the top of my code but they show the errors 'reportMissingModuleSource' for pandas and 'reportMissingImports' for alpha_vantage. I installed them in Command prompt and it was successful but it seems python doesn't recognise them or cant find them.
Potentially useful info:
When I first installed python I had to go into my Path settings and create a new Path to python.
I use VSCode
I had issues installing pip I cant remember why because I've been at this for hours.
Python version is 3.10.5 64bit
Pip version is 22.1.2
I am on Windows
I don't know what python files need to go where so they are slightly scattered around my directory.
Do I need to create a Path in my settings to each module, I already have one going to my scripts folder. I am very stuck so any help is appreciated.
Thank you for anyone that helps!

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!

How to install something that read excel files in python 3.3

I am new to python and I need to read an excel file in pyscripter. I understand that I should
import xrld
in Python and then use:
book = xlrd.open_workbook(os.path.join(file_source,file_name +".xlsx"))
to open and read the excel file.
However, I just don't understand how to install this module 'xrld'. I have looked on several websites and even on stackoverflow itself, but I just don't understand anything from the explanations that are given. I just don't understand how to install 'easy install' or 'pip' (or understand what these things are in the first place) or understand how to install anything else I need to read an excel file for. So far I installed a file called 'setuptools-36.01.1' from https://pypi.python.org/pypi/setuptools which should contain something I could use for running, but I just don't understand what to do.
I thereby must admit (and think it is clear by now) that I am a real noob when it comes to programming or computers in the first place.
Can someone please help me by explaining in plain English what exactly to do in order to read an excel file in python. I have Python 3.3.2 and use Pyscripter to run my simulation.
Your help would be really appreciated!
EasyInstall (easy_install) gives you a quick and painless way to install packages remotely by connecting other websites via HTTP.
Pip is a package management system used to install and manage software packages, such as those found in the Python Package Index. Pip is a replacement for easy_install.
Since you have installed the setuptools, easy_install will be already present in your system.
So just run easy_install pip in the command line to install pip . Then pip install xlrd for installing xlrd.
example code:
import xlrd
workbook = xlrd.open_workbook('C:/User/myaccount/Book1.xls')
worksheet = workbook.sheet_by_name('Sheet1')
print worksheet
Please go through this link-Reading Excel file using Python XLRD for sample codes for reading data from excel files in python.
Hope this helps you..

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.

Cannot seem to install pandas for python 2.7 on windows

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

Categories

Resources