I have already installed the anaconda module and it already has built-in pandas package that I want to make use of. I have python 3.6 installed in my machine. Environment variables for anaconda and python are set as well but I am still unable to import pandas on my python console.
Could anyone help me import the pandas? I can not make use of pip tool as I am working on my company's machine. Due to security issues, I am not allowed to download any package through pip. I want to make use of pre-installed anaconda module. Help me link my python to Anaconda.
Related
I installed tensorflow using Ananconda3 command prompt (by creating environment named tensorenviron).
But when i try to import tensorflow module in Python script using IntelliJ, it shows no such module. Please help.
IntelliJ shows me the following:
In the above picture, I can select one of the SDKs. If i select Python 3.9 (tensorenviron - I installed it using anaconda3), I can only use tensorflow module and not pandas (installed separately through pip) and other modules. I can use pandas by selecting Python 3.10 SDK but then I lose tensorflow.
Python 3.10 path is shown in the above image
Python 3.9 (having tensorflow, installed through anaconda3) path is in above figure.
I have installed latest pip, but i didn't install tensorflow using pip.
Please help me install all under same path, but tensorflow doesn't seem to support Python 3.10
I want to use python 3.7 in raspberry pi through miniconda but surfing, I got to know that miniconda provides python version upto 3.4. Some sources said to use berryconda, which I installed but still the conda info states my python version is 3.6. I tried to install python 3.7 through conda install python=3.7. But as u might have guessed that didnt work as well. I do have python 3.7 manually installed but I don't think there is a way to make conda use that version (please correct me if I'm wrong and tell me how).
I want to create an environment with these dependencies, but it seems I'm stuck on the first step (python 3.7):
name: yolov4-cpu
dependencies:
python==3.7
pip
matplotlib
opencv
pip:
opencv-python==4.1.1.26
lxml
tqdm
tensorflow==2.3.0rc0
absl-py
easydict
pillow
Is there a solution for my problem?
I'm using Python 3.7 and I recently upgraded to Spyder 4.2.0 from Spyder 4.1.5. Now when I run my code (which was working fine before) I get the following error:
ImportError: Missing optional dependency 'xlrd'. Install xlrd >= 1.0.0 for Excel support Use pip or conda to install xlrd.
So apparently Spyder thinks 'xlrd' ('Excel Reader'?) is not installed. So I went to the Anaconda prompt and tried pip install xlrd, but it replied with
Requirement already satisfied: xlrd in c:\users\michael\anaconda3\lib\site-packages (2.0.1)
I tried uninstalling and reinstalling xlrd anyways, using pip, but it didn't change anything. How do I resolve this error?
Also, I'm not sure if this matters or not, but I originally installed Spyder via Anaconda, whereas now I just downloaded Spyder 4.2.0 by itself, through this link: https://github.com/spyder-ide/spyder/releases.
Also, on the linked github page, it says: "If you are new to Python or the Scientific Python ecosystem, we strongly recommend you to install and use Anaconda. It comes with Spyder and all its dependencies, along with the most important Python scientific libraries (i.e. Numpy, Pandas, Matplotlib, IPython, etc) in a single, easy to use environment."
I had at first assumed this was meant for people downloading Python/Anaconda for the very first time, but now I'm thinking this applies to a semi newbie at Python such as me? As someone who is not very familiar with how packages and dependencies work, should I be downloading Anaconda every time I want to update Python or Spyder?
Apologies for the (probably) silly newbie question...
This sounds like you needed to re-start Spyder for it to pick up the package you installed.
However, as the author of xlrd, I would suggest you do the following:
Stop Spyder
conda install openpyxl
Start Spyder.
Change your pandas code to be pd.read_excel(..., engine='openpxyl')
I've recently downloaded the python package colorama to use in a small project, I'm having trouble installing/importing it.
For a bit more background, I use MacOS and I have two versions of Python on my Mac; 2.7 which comes with the mac by default and 3.7 which I use to code. The package seems to have been successfully installed, as when I try to reinstall it I get the message below. However, when I try to import the colorama module using a script in python 3.7 it simply tells me it doesn't exist.
Have I installed it for the wrong version of Python? And, if so, is it possible to make 3.7 my default version of python to prevent this from happening again? Or am I wrong about this issue entirely?
Requirement already satisfied: colorama in ./Library/Python/2.7/lib/python/site-packages (0.4.1)
Trying to import python module fake_useragent
Command prompt stating that it has already been installed.
Anybody knows how come I still cannot import the fake_useragent module in python even though I have already installed it?
Thank you very much, I have solved the problem. I have tried to uninstall and reinstall the module but it still did not work. I tried to use Jupyter Notebook as well as Pycharm to import the module but I could not. Eventually, I tried to import the module using IDLE, which is the default IDE which comes with downloading and installing Python from python.org and I was successful. Therefore, I suspected that I had accidentally installed two versions of Python on my computer. The problem is that I have already installed Python 3 inside my computer. However, on top of that, I have also installed the Anaconda package, which also installs its own version of Python 3. However, when I use pip to install the fake-useragent module, I am installing it for the original python version. Therefore, when I use Jupyter notebook which is part of the Anaconda package, I could not input the module. I could not import it for Pycharm as well since I used the Anaconda interpreter as Pycharm's default interpreter. After I have uninstalled Anaconda and changed the default interpreter for Pycharm under settings back to the original version of Python which I have installed, I'm able to import the fake-useragent in python.