This question already has an answer here:
Anaconda not finding my packages installed with `pip`
(1 answer)
Closed 6 years ago.
I am having some issues understanding what is happening with the installation of omdb module in my computer (https://github.com/dgilland/omdb.py).
I installed via Terminal using:
pip install omdb
Then I created a simple python script to test if it would import correctly:
import matplotlib
import omdb
print omdb.get(title='A Beautiful Mind', fullplot=True, tomatoes=True)
The script ran perfectly when I used python in terminal:
python movies.py
but then I tried to use my ipython with Anaconda, and I would always get the following message:
ImportError: no module named omdb
Is there another way to install a module, or am I missing something about Anaconda and Python?
All I wanted was to be able to use omdb. I'm using Python 2.7.11-0 and OS X 10.9.5. Any help is appreciated
That's because Anaconda installed packages aren't stored into a Python library, it has it's own warehouse. So you should use the command for it:
conda install omdb
Anaconda comes with its own package manager named conda. It also doubles as a virtual environment manager.
The Python package manager is pip, which is only a package manager and you will have to install virtualenv in order to manage virtual environments.
Related
I'm new to python trying to figure out some basics. I installed python 3.5 and then, to use jupyter notebook I installed anaconda distrubition. After that, I installed pycharm and started learning python.
After a few weeks, I was able to create a simple project which makes use of pyqt5. My project runs when I run it from pycharm itself, but when I try to run it with "python" command from cmd I get an error, stating that import from pyqt5 has failed. I did some research, and installed pyqt5 using pip, but the problem persists.
So what should I do to run my project without anaconda, using python 3.5?
It seems the anaconda distrubution and python itself were conflicting. Whenever I tried to install a module using pip (like pyqt5), it is installed under anaconda's python so when I try to invoke my own python from console i failed to use those installed modules. Hence there seems to be two option;
Delete all python related stuff from the computer and clean install python only - no anaconda. (I did this)
Or when installing a module, try using different pip's for the two python distrubutions on our computer. Check this link: Install a module using pip for specific python version
This question already has answers here:
How to change the path of Python in Spyder?
(5 answers)
Closed 4 years ago.
I am new to configuring and setting up Python from scratch.
I have installed Anaconda and I plan to use Spyder for python development. I also have a older version of Python installed on the same machine elsewhere.
I needed to get my hands on a package to use in Spyder which I needed to download and install.
I downloaded and installed pip directly from the website and then I used this in the command line of the older python install to obtain the package I required.
However I don't understand how I go about making this available to Spyder. I believe it works on a folder structure within it's own directory and I am unsure how to change this to get the package I have already downloaded.
I thought I might be able to copy it across, or point it at the directory where the package was downloaded to but I cannot work out how to do this.
I also tried using pip from within Spyder to work but it cannot find it.
Can you please let me know what I need to check?
from the command line can you use pip? Btw I believe python 3 comes with pip included anyway you need to make sure it's in your path
Find pip.exe on your computer, then add its folder (for example, C:\Python27\Scripts) to your path (Start / Edit environment variables). Now you should be able to run pip from the command line. Try installing a package:
pip install httpie
Try to:
Open Anaconda Prompt and then do: pip install whatever - to install wheels
If you want to install spyder the open Anaconda Navigator - and you should be in the home tab - then highlat spyder and press install - thats all.
There are other ways but within spyder ipython console you can install package like.
In [1]: import pip
In [2]: pip.main(['install', 'module-name'])
I am trying to import simpy package in python, however I get the unnamed module error. I am on a Mac OSX and have anaconda installed. I installed it using pip install simpy command. These outputs could also be helpful:
$ which python
//anaconda/bin/python
$ pip list
simpy (3.0.10)
$ conda list
simpy 3.0.10 <pip>
(If relevant, I am using PyCharm as IDE)
The error could be caused by your project configuration in pycharm pointing to another python interpreter, maybe python3 or a virtualenv?
Check it by going through your project settings.
Make sure you are using the same interpreter in PyCharm as the one where you installed your module.
This question already has answers here:
Error "Import Error: No module named numpy" on Windows
(28 answers)
Closed last year.
I have a very similar question to this question. I have only one version of python 3.5 installed on my Windows 7 64-bit system. I installed Anaconda3.4 via official website - as suggested in the question. The installation went fine but when I want to import(I just typing python from the command line )
import numpy
Import error:No module named numpy
Then I exit and type
pip install numpy
Requirement already satisfied (use --upgrade to upgrade): numpy in d:\program fi
les\anaconda3\lib\site-packages
I know this is probably a super basic question, but I'm still learning... Thanks
If you are using Anaconda3 then you should already have numpy installed. There is no reason to use pip. My guess is that the Anaconda distribution is possibly not on your path and you are picking up some other system python.
You should run where python (or where python3) to see which one you are using. If the executable is not in the Anaconda install, then that is your problem and you will need to edit your path environment variable to ensure that you are opening the python you want.
Anaconda installs python with it so whenever you are running python, you need to make sure you are using the one which anaconda installed. Use this command to know which python executable you are using right now. Keep the one installed by anaconda(typically inside anaconda folder) and uninstall any other.
where python
First, remove the numpy from anaconda:
conda remove numpy
Then, install it back using pip
pip install numpy
This works for me.
It is possible that numpy is not installed in the virtual environment that you are using at runtime, but may be installed as part of the global anaconda install.
From the terminal first activate the enviroment.
$ source activate {your environment name}
Then install numpy with conda install
$ conda install numpy
I found that this was the case with an environment that I had created with pycharm.
Installing it locally corrected the issue.
I am trying to import Python packages that I had previously installed but I keep getting this error when trying to import it
"ImportError: No module named gdal"
In the images attached (in the link :P) you can see that the package python-gdal and python-numpy are installed. I am also attaching the python output.
P.S = I am using Ubuntu and running python from the terminal.
You have possibly installed a non-Ubuntu version of Python - Anaconda - yet these packages are installed into the system Python. You should probably remove Anaconda, and/or run the system Python explicitly as /usr/bin/python.