I installed a python module, the installation was a success.
I installed it by changing the path in Windows powershell to the folder and then
python setup.py install
but then when i try to import that I get a error message
no module named yahoo_finance
Any idea?
You don't have yahoo_finace module installed.
You can install this module by command:
python -m pip install yahoo_finance
Here you may read more about pip:
https://pip.pypa.io/en/stable/reference/pip/
Related
I have successfully installed textract module using pip install textract on windows 10 after following these steps, but when i try to import textract(using Spyder IDE python 3.6.10 anaconda), i get ModuleNotFoundError: No module named 'textract'.
In command prompt when i enter the pip list command, i can see the mentioned module version 1.6.3, but when i enter conda list i can't find it.
I have added the paths in the system environment variables for conda, and also for pip.
I am new to python, did i miss anything? or is it that i can't import modules installed from pip and it should be installed with conda?
I am using Pycharm Virtual Environment for a project and working on windows 8.1 x64. Trying to do image processing on python and for this needed to import utilities. The package is present at this link. https://pypi.org/project/utilities/
In my code i am using these commands:
from utilities.utilities import Utilities as Utils
import utilities.constants as Constants
and when I try to do pip install utilities or try to install the package from settings, even though it is present there but it gives these errors
ModuleNotFoundError: No module named 'utilities'
How can I install this package if I cannot use pip then how do i manually install from package. Please guide on both.
Using Python 3.8.0 on Mac OS 10.15.3 (Catalina) with pyenv.
When I try to run a file, it returns:
ModuleNotFoundError: No module named '_tkinter'
I've tried brew install tcl-tk. I'm a little worried that because I'm running python on top of pyenv, any third party tkinter module doesn't get run properly.
Running brew doctor returned:
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
`/Users/jm/.pyenv/shims/python3.7-config
/Users/jm/.pyenv/shims/python3.7m-config
/Users/jm/.pyenv/shims/python-config
/Users/jm/.pyenv/shims/python3-config
/Users/jm/.pyenv/shims/python3.8-config`
After trying a bunch of things, this is how it finally worked:
$ brew install python-tk
try to use pip3 it's working in my pip3 install tk
You should install tkinter. To install tkinter write this on console:
pip install tk
I am working with python flask's requests module. I have installed requests module using :
pip install requests
And verified that requests module exists when I run :
pip list
But when I run my python application , I receive import Error for requests module.
I noticed that pip is installing the module in C:\Users\xx\Documents\Projects\Python\Python3REST\lib\site-packages\ folder BUT the interpreter is looking for the module in C:\Users\xx\Documents\Projects\Python\Python3REST\lib\site-packages\flask\ folder.
I have tried running the command :
pip install --install-option="Path to install in" requests
But threw some other error.
The import error I am getting states :
ImportError: cannot import name 'requests' from 'flask'
(C:\Users\xx\Documents\Projects\Python\Python3REST\lib\site-packages\flask\__init__.py)
I am working in virtualenv in Windows 10.
I recently had the same problem installing a self made package. I installed it with pip install <package> and checked it was actually installed with pip list but running the script with import <package> returned a ModuleNotFoundError: No module named <package>.
I solved the problem creating an empty file called __init__.py in the package directory.
Check https://pythontips.com/2013/07/28/what-is-init-py/ and https://docs.python.org/3/tutorial/modules.html#packages for better understanding.
what if you add that folder to your path? using sys.path.extend?
I solved it using python3 -m pip install <package name>. In the OP's case, it should be python3 -m pip install requests.
Note that I'm using python 3.10.
I am running Python version 2.7.12 a windows system without internet access and have manually installed modules. However when trying to run a script requiring matplotlib.pyplot and after installing the dependencies dateutil it is still not working.
I am still receiving the error:
What is the reason for the error? I have been troubleshooting the problem for a long time.
Try using Pip to install the package. You can download a copy of dateutil 2.5.3 from here https://pypi.python.org/pypi/python-dateutil/2.5.3.
Once downloaded, navigate to the folder where you downloaded the dateutil package, and install the package with pip:
pip install python_dateutil-2.5.3-py2.py3-none-any.whl
After the module is installed, simply import as normal in the console or script:
import dateutil
And here is a quick example:
If you need to install pip, here are some instruction to install pip.