I am trying to use the Scratch library.
For example:
from scratch.probability import normal_cdf
from scratch.linear_algebra import Vector, dot
#...
I installed Scratch using pip install scratch but I receive this error: ModuleNotFoundError: No module named 'scratch'.
Can you help me?
pip install scratch will install this: https://pypi.org/project/scratch/
But I guess that what you want to use is that: https://github.com/joelgrus/data-science-from-scratch
The second one is not meant to be installed through pip but used directly in a clone of the project as documented in its README.
About pip install scratch-probability (https://pypi.org/project/scratch-probability/#description), as it's not documented, you need to go check the content of the tarball to know how the package inside are named (if they are what's expected).
Related
I am trying to get the python package, scitools-iris, installed on my Debian 9 system and I ran into this problem where scitools-iris fails to install due to an ImportError, ImportError: No module named target_pkg.
I am using python 2.7 and all packages are installed using pip only. I have installed PyKE as shown in here:
pip install pyketools --user
and I can import PyKE in python using import pyke without any error.
Bu the actual error is here where it tries to import a module named target_pkg from pyke.target_pkg. I tried the import statement in python,
from pyke.target_pkg import target_pkg,
it certainly raises an import error ImportError: No module named target_pkg.
How do I get around this problem and install iris in my system?
Have I installed the wrong package for PyKE?
Found out what I have been doing wrong. I actually had the wrong package installed for PyKE using pip. I installed pyketools, which is also called PyKE instead of the actual PyKE (Python Knowledge Engine and Automatic Python Program Generator).
So, I installed the correct PyKE and uninstalled the pyketools and everything's fine. Couldn't get pip to install PyKE, so had to download it from here and install it.
I downloaded multiple modules (Discord API, cx_Freeze) (pip download, Windows 10) and now I wanted to use them.
But when I want to import them, it says there isn’t any module.
From my former Python using (before resetting computer) I‘ve added a pycache folder and it worked for one module. I‘m not able to reproduce it for other modules. What to do?
I‘ve only one Python version (3.6.5) on PC.
I‘ve checked the \site-packages folder and they‘re there.
If you are using python3 then try downloading the library using
pip3 install libname
but if you are using python2 then install the library using
pip2 install libname or just pip install libname
try with these command and reply
try installing your library using the command prompt in normal user and with the admin user so that you will get to know that what is happening and also if it is still not working then try installing the library into the same folder of your project using pip custom install command
pip install -t <direct directory> <package>
then use the import statement
For Example I used
pip2 install -t c:\Users\Nav\Desktop\projectss cx_freeze
then i imported the library using
#from cx_Freeze import setup, Executable
import cx_Freeze
from cx_Freeze import *
it worked.
Previously i was getting error like :
File "C:\Python27\lib\site-packages\cx_Freeze\__init__.py", line 10, in <module>
from cx_Freeze.finder import *
ImportError: No module named finder
After custom install it is working
I'm the owner of this repo and I'm trying to import it from another project. I installed it using pip via pip install git+https://github.com/FranGoitia/shapelets, but I'm not able to import it. I tried importing shapelets and shapelets_classifier and neither worked.
you don't install the git repo the right way.
try this:
pip install -e git+git://github.com/FranGoitia/shapelets#master#egg=shapelets_classifier-1.0-py3.5
then you can use
import shapelet
As you can see in the repository, the file you're actually trying to import from is shapelet.py, so try import shapelet
I have download language-check package and pasted in D:\Lib\site-packages\nltk but when I type the code over python interpreter as:
import language_check
It gives me an error: no module named language_check.
You need to properly install the package first, for example using
pip install language_check
here are a couple of links to help you:
https://docs.python.org/3/installing/
How do I install Python packages on Windows?
I just started learning Python and a bit confused about how packages are distributed and installed. I am aware of helper scripts easy_install and pip which can be used to install the dependent modules,howerver I am not clear how to do with programatically,can someone help me on this?
How to install dependent modules automatically when running python applications? I have a dependency on subprocess32 and other modules,I want to automatically install them if they are not present....
File "script.py", line 6, in <module>
import subprocess32 as subprocess
ImportError: No module named subprocess32
I have looked at some posts online below but not clear...really appreciate guidance here
locallyoptimal.com/blog/2014/03/14/executable-python-scripts-via-entry-points/
Python packages installation in Windows
Easiest way to handle module installs within a program is with pip:
import pip
pip.main(["install", "numpy"])
For example will install numpy and its dependencies. You can also specify versions using numpy=xxx, or upgrade by passing "-upgrade" between those two above.