import nltk
is Python syntax, and as such won’t work in a shell script.
To test the version of nltk
and scikit_learn
, you can write a Python script and run it. Such a script may look like
import nltk import sklearn print('The nltk version is {}.'.format(nltk.__version__)) print('The scikit-learn version is {}.'.format(sklearn.__version__)) # The nltk version is 3.0.0. # The scikit-learn version is 0.15.2.
Note that not all Python packages are guaranteed to have a __version__
attribute, so for some others it may fail, but for nltk and scikit-learn at least it will work.
Related Posts:
- How to execute a program or call a system command?
- No module named ‘sklearn.cross_validation’
- ValueError: Unknown label type: ‘continuous’
- Converting list to numpy array
- sklearn error ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64’)
- sklearn error ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64’)
- TypeError: cannot perform reduce with flexible type
- sklearn error ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64’)
- How to normalize a NumPy array to a unit vector?
- re.sub erroring with “Expected string or bytes-like object”
- ModuleNotFoundError: No module named ‘sklearn’
- Arrays used as indices must be of integer (or boolean) type
- How can I plot a confusion matrix? [duplicate]
- ModuleNotFoundError: No module named ‘sklearn’
- How to upgrade pip3?
- Why do people write #!/usr/bin/env python on the first line of a Python script?
- subprocess.Popen(): OSError: [Errno 8] Exec format error in python?
- How to upgrade pip3?
- How to normalize a NumPy array to a unit vector?
- How to activate virtualenv in Linux?
- using pip3: module “importlib._bootstrap” has no attribute “SourceFileLoader”
- boto3 client NoRegionError: You must specify a region error only sometimes
- What are all possible pos tags of NLTK?
- Arrays used as indices must be of integer (or boolean) type
- mysql_config not found when installing mysqldb python interface
- sklearn Logistic Regression “ValueError: Found array with dim 3. Estimator expected <= 2."
- standard_init_linux.go:178: exec user process caused “exec format error”
- RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility
- Difference between scikit-learn and sklearn
- How can I install the latest Anaconda with wget
- Get Confusion Matrix From a Keras Multiclass Model
- What’s the difference between scikit-learn and tensorflow? Is it possible to use them together?
- Pycharm and sys.argv arguments
- Is there any simple way to benchmark Python script?
- RuntimeError: Invalid DISPLAY variable
- Scikit-learn GridSearch giving “ValueError: multiclass format is not supported” error
- ImportError in importing from sklearn: cannot import name check_build
- Can sklearn random forest directly handle categorical features?
- ImportError: No module named model_selection
- How do I update a Python package?
- Got continuous is not supported error in RandomForestRegressor
- Spell Checker for Python
- Python/Scikit-Learn – Can’t handle mix of multiclass and continuous
- Running shell command and capturing the output
- ValueError: multiclass format is not supported
- Package libffi was not found in the pkg-config search path REDHAT6.5
- str.translate gives TypeError – Translate takes one argument (2 given), worked in Python 2
- strip(char) on a string
- How can I represent an infinite number in Python?
- Constructing pandas DataFrame from values in variables gives “ValueError: If using all scalar values, you must pass an index”
- TypeError: ‘NoneType’ object is not iterable in Python
- Relative imports – ModuleNotFoundError: No module named x
- ValueError: invalid literal for int() with base 10: ”
- What does the “yield” keyword do?
- How do I get the number of elements in a list?
- How to solve dictionary changed size during iteration error?
- iloc giving ‘IndexError: single positional indexer is out-of-bounds’
- What does “\r” do in the following script?
- Anaconda vs. miniconda
- No module named serial
- ImportError: No module named psycopg2
- DataFrame constructor not properly called
- How does functools partial do what it does?
- How to get element-wise matrix multiplication (Hadamard product) in numpy?
- Matplotlib automatic legend outside plot
- Why am I getting this syntax error: keyword can’t be an expression
- Django: ImproperlyConfigured: The SECRET_KEY setting must not be empty
- What is dtype(‘O’), in pandas?
- ctypes – Beginner
- Keras, how do I predict after I trained a model?
- How do I find out my PYTHONPATH using Python?
- ValueError: could not broadcast input array from shape (224,224,3) into shape (224,224)
- Overflow Error in Python’s numpy.exp function
- Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock
- Can’t broadcast input array from shape (3,1) into shape (3,)
- How to create an array of bits in Python?
- Setting Django up to use MySQL
- In Python, when to use a Dictionary, List or Set?
- How can I check for NaN values?
- Python – how to use the constant e^
- Check if two unordered lists are equal
- Is there a list of Pytz Timezones?
- Flask example with POST
- How do I change the figure size with subplots?
- Clear terminal in Python [duplicate]
- Easy pretty printing of floats?
- Algorithm for solving Sudoku
- How to read pickle file?
- Running a Python script from PHP
- Python Socket Receive Large Amount of Data
- What is a “slug” in Django?
- Rolling or sliding window iterator?
- What is a namespace object?
- How to serve static files in Flask
- How to create Gephi network graphs from Python?
- strncmp in python
- Is it possible to forward-declare a function in Python?
- Python OpenCV2 (cv2) wrapper to get image size?
- KeyError: ‘plotly_domain’
- The value of _stdout is incorrect