Unable to import pandas in Linux environment - python

In Linux Environment I have installed pandas using "pip install pandas"
but when I'm running python and using import pandas for that I'm getting such error
>>> import pandas
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pandas
Is there anyways which automatically installs pandas library as a part of code in Linux environment

Related

getting error while importing dbinit in python

hello I am getting error while trying to import dbinit. Is there any specefic library that I should install or download?
import dbinit as d
getting this error -
PS C:\Users\SRLAB-09\Desktop\movie_project> & C:/Users/SRLAB-09/AppData/Local/Programs/Python/Python37-32/python.exe c:/Users/SRLAB-09/Desktop/movie_project/interface.py
Traceback (most recent call last):
File "c:/Users/SRLAB-09/Desktop/movie_project/interface.py", line 1, in <module>
import dbinit as d
ModuleNotFoundError: No module named 'dbinit'
PS C:\Users\SRLAB-09\Desktop\movie_project>
Virtual Environment only:
You need to download the dbinit package in your Virtual Environment.
Otherwise:
Check if you have dbinit downloaded in the first place. If not, download it

No module named 'pandas.compat'

I am getting the following error when I run any python program that uses panda
Traceback (most recent call last):
File "filter_SNV_SV.py", line 3, in <module>
import pandas as pd
File "/users/<userid>/.local/lib/python3.8/site-packages/pandas/__init__.py", line 22, in <module>
from pandas.compat import (
ModuleNotFoundError: No module named 'pandas.compat'
I can understand that the error is because it is searching for panda at .local/lib, but when I check the which python, it gives me following
/users/<userid>/anaconda3/bin/python
and
python3 -m pip freeze | grep -i pandas
pandas==1.3.3
pandas-compat==0.1.1
I am running it on CentOS 6 cluster. Can anyone suggest what should I do about this?
It worked fine after I renamed /users/<userid>/.local/lib/python3.8 to /users/<userid>/.local/lib/py3.8

Why can't I install pyler module?

I get an error while I try to import the pyler module in python. I have uninstalled and then installed the module many times, and also with the .whl file, but still only the info file is generated.
import pyler
When I write this, I get
Traceback (most recent call last): File "c:\Users\USER\Documents\Tanav\VsCode\tut1\Python proj\smth.py", line 1, in <module> import pyler ModuleNotFoundError: No module named 'pyler'
I use python version 3.8.5 on windows 10 64-bit machine.
Please help

Quandl import error in Python 3

I'm using Python 3.6.3 on Windows 10 and Quandl module in my pip list, but I get the following error:
import quandl
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
import quandl
File "C:\Users\Kamal\AppData\Local\Programs\Python\Python36-32\lib\quandl\__init__.py", line 3, in <module>
from .api_config import ApiConfig
ModuleNotFoundError: No module named 'quandl.api_config'
Try pip3 install quandl. If you have python2 installed, there may be a mismatch in symlinks related to pip.

Cannot import Pandasql in Python 2.7

I've just installed a fresh version of Python 2.7.11 via Anaconda and installed pandas 0.17.1 and pandasql 0.6.3.
Whenever I enter the python IDE and type:
import pandas
Or
import pandasql
I receive the following message:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pandas.py", line 1, in <module>
import pandasql
File "/Users/kenkehoe/anaconda/envs/python2/lib/python2.7/site-packages/pandasql/__init__.py", line 1, in <module>
from .sqldf import sqldf
File "/Users/kenkehoe/anaconda/envs/python2/lib/python2.7/site-packages/pandasql/sqldf.py", line 4, in <module>
from pandas.io.sql import to_sql, read_sql
ImportError: No module named io.sql
Everything seems dependent on this pandas.io.sql module. I've tried uninstalling Pandas and reinstalling and using pip instead of Anaconda, but nothing seems to work.
Any ideas on how to successfully import pandasql?
The problem is that your file is named panda.py, and that's what you actually import.

Categories