I had used a pip install to install the pyeeg library, the code to which is as follows(installing the package in the jupyter notebook environment using ! before the pip install statement):
pip install pyeeg
The package and its other associated dependencies get installed, but when trying to import the library, the code to which is as follows:
import pyeeg
The following error is displayed:
ModuleNotFoundError: No module named 'pyeeg'
I've tried installing the library in user mode too, but the same error gets displayed
I've also tried downloading the respective source code file and placing it in my directory path, but the file seems to be having an issue.
Looking for some help in this regard.
Thank you,
Installation can be done as specified in the main repo. The steps are as follows:
git clone https://github.com/forrestbao/pyeeg.git
cd pyeeg
python setup.py install
python setup.py install --user
Related
I am having error importing modules in my jupyter notebook when running it on a mac machine after successfully installing them using:
!pip install <library name>.
I try it on several modules and error persists.
for example, when running this code
!pip install pyenchant
I get this:
Requirement already satisfied: pyenchant in
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages
(3.2.2)
when running :
import enchant
I am getting an error message:
ModuleNotFoundError: No module named 'pyspellchecker'
then try to run this (as I read this could help)
!python -m pip install -U pyenchant
and get that:
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named pip
I think it has something to do with python path and bash_profile but I do not have an intuition for it.
I do not know if it is helpful/relevant, but I have Pycharm, python, Visual Studio Code and anconda installed on my machine. I am doubting that the problem comes from misalignment between the common configuration files of these programs.
can you please help?
I realize that many has encounter similar issue but their solutions did not help me.
p.s. the issue disappear when I use conda install , but I would like to use pip as it give me access to larger library options.
I've installed a module named rauth through terminal with pip3 install rauth command but when I import the module and run the code on Visual Studio Code with python3 interpreter, it gives ModuleNotFoundError: No module named 'rauth' error. But it is indeed installed and I can use it in Anaconda. The package file is stored here.
/Users/puffedricecracker/anaconda3/lib/python3.7/site-packages/rauth
And it seems like all my pip installed packages are stored in that path, but those are imported outside Anaconda with no problem. Tried several other commands as google search suggested.
• pip install instead of pip3 install
• python -m pip install
• python3 -m pip install
Let me know if there is any other information needed to be specified.
this is due to the module is installed into site-packages in Anaconda but not Visual Studio. Can you check if the module exists in Visual Studio folder? Another way to test it is to open Python IDLE and run the import, it should also return an error.
I don't know if this could be an universal solution but there was a way to set where to install a package using pip.
In python shell, find where your python modules usually go. It seemed like most of pip installed packages were installed in the second path so I chose that.
>>> import re
>>> print(re.__file__)
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/re.py
>>> import sqlalchemy
>>> print(sqlalchemy.__file__)
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sqlalchemy/__init__.py
Uninstall the package using pip uninstall packagename
Reinstall with a path name.
pip install packagename -t /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages
(In fact, just copy pasting package files (in my case, they were rauth, rauth-0.7.3.dist-info) from anaconda package path in the post worked.)
I'm trying to install a custom python package on Google Colaboratory, that is not available on pip. And I'm facing some weird errors while doing that.
For example, here is a boiler-plate python package: https://github.com/mtchavez/python-package-boilerplate.
Then I tried to install it from the source.
%%bash
git clone https://github.com/mtchavez/python-package-boilerplate
cd rohan
pip install -e .
This time, however, I had experienced errors while importing submodules
ImportError: cannot import name ..
This package installs perfectly on my local computer/s. So I'm not sure why I'm not able to use it on Colaboratory.
A much simpler way to install custom packages on colab:
pip install git+https://github.com/mtchavez/python-package-boilerplate
I've installed python 3.4 on win7. I need faker module to be installed to run the script.
error:
from faker import Factory
ImportError: No module named 'faker'.
I've downloaded few zip's with faker, but unfortunately have no idea how to install it.
Please give simple instructions, how to make it work.(on windows)
Since you have downloaded the zip source from https://github.com/joke2k/faker according to your comments , you can also do the following after changing to the directory where you have setup.py -
python setup.py install
According to the github page itself, to install using pip do -
pip install fake-factory
Use the Python package tool pip.
Open a command prompt and do
pip install fake-factory
or
python -m pip install fake-factory
See the documentation for more information.
I'm new to Python so this may sound silly.
I want to use a Python library I've found on Github, lets say on https://github.com/praw-dev/praw, and I want to be able to do git pull in the future to pull the latest commits.
Question: Should I git clone <git url> in the project directory and delete everything except the praw directory, then in my python script do a import praw?
In iPython,
import praw
gives the error ImportError: No module named praw
Directory Structure
~\myProject\
praw\
myNotebook.ipynb
Actually, if given package is not on PyPI (or you want a specific branch) you can still install it through pip from GitHub with:
pip install git+https://github.com/[repo owner]/[repo]#[branch name]
And for your problem it would be (although #pandita's answer is correct for normal usage case):
pip install git+https://github.com/praw-dev/praw.git
For more information check this answer.
Experimental Python module finder/loader from github, like in golang.
So, in golang we can import like:
import "github.com/parnurzeal/gorequest"
But in python we should install package by our hands:
pip install requests
And import it like:
import requests
But with this magic package and power of PEP-0302 we can do it automatically:
from github_com.kennethreitz import requests
assert requests.get('https://github.com/nvbn/import_from_github_com').status_code == 200
Installation
You should have git, Python 3.2+ and pip:
pip install import_from_github_com
Reference: https://github.com/nvbn/import_from_github_com
Just clone the files in any dir on your python path and then build the lib typically with python setup.py install from the command line.
I typically clone a libray form git in my site_libraries folder ( the folder that holds all of your pip installed packages ). From there you can pull and then build the libraries from git just like any other git repo. Having the files there is nice because all of your libs are in once place on your python path.
You might want to consider using pip instead of git to install and upgrade the package (that is unless you have a pressing reason to use git).
pip install praw
to update the package you can do
pip install --upgrade praw
Also have a look here for further information on how to use pip.