how to install "pip install rasa", I am getting error - python

I am getting the below error while i am trying for "pip install rasa". My Python Version is 3.7.8.
Error message :
Requirement already satisfied: python-dateutil<2.9,>=2.8 in c:\users\loginname\desktop\2020\chatbot\venv\lib\site-packages (from rasa) (2.8.1)
Collecting colorhash<1.1.0,>=1.0.2
Using cached colorhash-1.0.2-py2.py3-none-any.whl (6.0 kB)
Collecting ujson<3.0,>=1.35
Using cached ujson-2.0.3.tar.gz (7.1 MB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\loginname\desktop\2020\chatbot\venv\scripts\python.exe' 'c:\users\loginname\desktop\2020\chatbot\venv\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\loginname\AppData\Local\Temp\pip-build-env-nir8n2vw\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
cwd: None
Complete output (42 lines):
Traceback (most recent call last):
File "C:\Users\loginname\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\loginname\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\users\loginname\desktop\2020\chatbot\venv\lib\site-packages\pip\__main__.py", line 26, in <module>
sys.exit(_main())
File "c:\users\loginname\desktop\2020\chatbot\venv\lib\site-packages\pip\_internal\cli\main.py", line 73, in main
command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
File "c:\users\loginname\desktop\2020\chatbot\venv\lib\site-packages\pip\_internal\commands\__init__.py", line 104, in create_command
module = importlib.import_module(module_path)
File "C:\Users\loginname\AppData\Local\Programs\Python\Python37\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked

$ sudo apt install python3-dev python3-pip
$ python3 -m venv ./venv
$ source ./venv/bin/activate
$ pip install -U pip
$ pip install rasa
https://rasa.com/docs/rasa/user-guide/installation/

Related

PIP3 python pip3 does not work or install property

PIP3 does not install!
Meanwhile i was setting my vps i tried to install python3 thorugh repositories and it did worked but i wasn't lucky for pip3. please help.
I got this:
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 22, in <module>
from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 73, in <module>
vendored("pkg_resources")
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 33, in vendored
__import__(modulename, globals(), locals(), level=0)
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 77, in <module>
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/_vendor/packaging/requirements.py", line 9, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 672, in _load_unlocked
File "<frozen importlib._bootstrap>", line 632, in _load_backward_compatible
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/extern/__init__.py", line 43, in load_module
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/_vendor/pyparsing.py", line 943, in <module>
AttributeError: module 'collections' has no attribute 'MutableMapping'
I did this:
sudo apt update
sudo apt install python3-pip
pip3 -V
Try running this:
pip3 install --upgrade pip3
pip3 install --upgrade wheel
pip3 install --upgrade setuptools
pip3 install --upgrade requests
should fix it

How to solve error installing jupyter notebook?

I am trying to install jupyter notebook in my local.
If I run pip install jupyterlab I get the following output.
Using cached jupyterlab-3.4.3-py3-none-any.whl (8.8 MB)
Collecting jupyterlab-server~=2.10
Using cached jupyterlab_server-2.14.0-py3-none-any.whl (54 kB)
Collecting nbclassic~=0.2
Using cached nbclassic-0.3.7-py3-none-any.whl (13 kB)
Collecting jinja2>=2.1
Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting jupyter-server~=1.16
Using cached jupyter_server-1.18.0-py3-none-any.whl (344 kB)
Collecting ipython
Using cached ipython-8.4.0-py3-none-any.whl (750 kB)
Collecting jupyter-core
Using cached jupyter_core-4.10.0-py3-none-any.whl (87 kB)
Collecting tornado>=6.1.0
Using cached tornado-6.1.tar.gz (497 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: packaging in c:\msys64\mingw64\lib\python3.9\site-packages (from jupyterlab) (21.3)
Collecting MarkupSafe>=2.0
Using cached MarkupSafe-2.1.1.tar.gz (18 kB)
Preparing metadata (setup.py) ... done
Collecting prometheus-client
Using cached prometheus_client-0.14.1-py3-none-any.whl (59 kB)
Collecting traitlets>=5.1
Using cached traitlets-5.3.0-py3-none-any.whl (106 kB)
Collecting websocket-client
Using cached websocket_client-1.3.3-py3-none-any.whl (54 kB)
Collecting pywinpty
Using cached pywinpty-2.0.5.tar.gz (23 kB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [63 lines of output]
Collecting maturin<0.13,>=0.12.6
Using cached maturin-0.12.20.tar.gz (156 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
error: subprocess-exited-with-error
Getting requirements to build wheel did not run successfully.
exit code: 1
[40 lines of output]
Traceback (most recent call last):
File "C:\Users\SMaronas\AppData\Local\Temp\tmp8a0ebdap_in_process.py", line 363, in <module>
main()
File "C:\Users\SMaronas\AppData\Local\Temp\tmp8a0ebdap_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\SMaronas\AppData\Local\Temp\tmp8a0ebdap_in_process.py", line 124, in get_requires_for_build_wheel backend = _build_backend()
File "C:\Users\SMaronas\AppData\Local\Temp\tmp8a0ebdap_in_process.py", line 89, in _build_backend
obj = import_module(mod_path)
File "C:\msys64\mingw64\lib\python3.9\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:\Users\SMaronas\AppData\Local\Temp\pip-build-env-riviqm6h\overlay\lib\python3.9\site-packages\setuptools\__init__.py", line 241, in <module>
monkey.patch_all()
File "C:\Users\SMaronas\AppData\Local\Temp\pip-build-env-riviqm6h\overlay\lib\python3.9\site-packages\setuptools\monkey.py", line 99, in patch_all
patch_for_msvc_specialized_compiler()
File "C:\Users\SMaronas\AppData\Local\Temp\pip-build-env-riviqm6h\overlay\lib\python3.9\site-packages\setuptools\monkey.py", line 162, in patch_for_msvc_specialized_compiler
patch_func(*msvc9('find_vcvarsall'))
File "C:\Users\SMaronas\AppData\Local\Temp\pip-build-env-riviqm6h\overlay\lib\python3.9\site-packages\setuptools\monkey.py", line 149, in patch_params
mod = import_module(mod_name)
File "C:\msys64\mingw64\lib\python3.9\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:\Users\SMaronas\AppData\Local\Temp\pip-build-env-riviqm6h\overlay\lib\python3.9\site-packages\setuptools\_distutils\msvc9compiler.py", line 295, in <module>
raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION)
distutils.errors.DistutilsPlatformError: VC 6.0 is not supported by this module
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
Getting requirements to build wheel did not run successfully.
exit code: 1
See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
I already tried pip install wheel and the result is that it is already installed.
Requirement already satisfied: wheel in c:\msys64\mingw64\lib\python3.9\site-packages (0.37.1)
I already tried uninstalling and reinstalling python entirely.
A few things to notice:
I am trying to do this on windows
I do have WSL installed and enabled (idk if that is causing some noise)
See this link. Apparently the GTK is this issue consider switching, or uninstalling setuptools (pip). And use pacman.
msys2/mingw64: pip: VC 6.0 is not supported by this module

pip fails with python3.10 & python3.11

I have python 3.8 & 3.9 and 3.10 and 3.11 installed, however pip install does not work for 3.10 and 3.11 and only works for the rest simply please observe:
pip3 install jedi
returns:
Requirement already satisfied: jedi in /home/user/.local/lib/python3.8/site-packages (0.17.2)
Requirement already satisfied: parso<0.8.0,>=0.7.0 in /home/user/.local/lib/python3.8/site-packages (from jedi) (0.7.1)
so does:
pip install jedi
returns
Requirement already satisfied: jedi in /home/user/.local/lib/python3.8/site-packages (0.17.2)
Requirement already satisfied: parso<0.8.0,>=0.7.0 in /home/user/.local/lib/python3.8/site-packages (from jedi) (0.7.1)
as well as :
python3.8 -m pip install jedi
results in:
Requirement already satisfied: jedi in /home/c/.local/lib/python3.8/site-packages (0.17.2)
Requirement already satisfied: parso<0.8.0,>=0.7.0 in /home/c/.local/lib/python3.8/site-packages (from jedi) (0.7.1)
However
python3.10 -m pip install jedi
results in :
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/usr/lib/python3/dist-packages/pip/__main__.py", line 19, in <module>
sys.exit(_main())
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main.py", line 73, in main
command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
File "/usr/lib/python3/dist-packages/pip/_internal/commands/__init__.py", line 96, in create_command
module = importlib.import_module(module_path)
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 24, in <module>
from pip._internal.cli.req_command import RequirementCommand
File "/usr/lib/python3/dist-packages/pip/_internal/cli/req_command.py", line 15, in <module>
from pip._internal.index.package_finder import PackageFinder
File "/usr/lib/python3/dist-packages/pip/_internal/index/package_finder.py", line 21, in <module>
from pip._internal.index.collector import parse_links
File "/usr/lib/python3/dist-packages/pip/_internal/index/collector.py", line 12, in <module>
from pip._vendor import html5lib, requests
ImportError: cannot import name 'html5lib' from 'pip._vendor' (/usr/lib/python3/dist-packages/pip/_vendor/__init__.py)
Python versions are managed by alternatives
update-alternatives --query python
which returns:
Name: python
Link: /usr/bin/python
Status: auto
Best: /usr/bin/python3.8
Value: /usr/bin/python3.8
Alternative: /usr/bin/python3.8
Priority: 80
and
update-alternatives --query python3
returns:
Name: python3
Link: /usr/bin/python3
Status: auto
Best: /usr/bin/python3.8
Value: /usr/bin/python3.8
Alternative: /usr/bin/python3.10
Priority: 40
Alternative: /usr/bin/python3.8
Priority: 90
I tried re-installing practically everything including python versions and the modules to no avail.
I am not too sure what is the root of the problem or actually what is the process that leads here, it only does
It's always best to run the pip as a main module with the version of Python you want to install for.
python3.9 -m pip install ...
python3.10 -m pip install ...
python3.11 -m pip install ...
If you want to force an upgrade, use the --upgrade option.
First try to install pygames
PS > py -m pip install pygames
ERROR: Could not find a version that satisfies the requirement
pygames (from versions: none)
ERROR: No matching distribution found for pygames
There is a version conflict. I have many Python versions (2.4 - 3.11) on Windows 11.
py laucher defaults to highest Python version installed.
=> specify py launcher option -xx.yy-ZZ like:
(More info: py --help)
PS > py -3.7-32 -m pip install -U pygame
Collecting pygame
Downloading pygame-2.1.2-cp37-cp37m-win32.whl (8.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
8.1/8.1 MB 1.2 MB/s
Installing collected packages: pygame
Successfully installed pygame-2.1.2
PS > py -3.7-32
Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 22:20:52) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
'>>> from pygame import *'
'>>>'
Happy end!

SQLAlchemy installation fails with `module 'enum' has no attribute 'IntFlag'`

pip install SQLAlchemy
It gives me that error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /usr/local/lib/python3.6/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-z5g_5ku8/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
cwd: None
Complete output (39 lines):
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.6/dist-packages/pip/__main__.py", line 16, in <module>
from pip._internal.cli.main import main as _main # isort:skip # noqa
File "/usr/local/lib/python3.6/dist-packages/pip/_internal/cli/main.py", line 5, in <module>
import locale
File "/usr/lib/python3.6/locale.py", line 16, in <module>
import re
File "/usr/lib/python3.6/re.py", line 142, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 53, in apport_excepthook
if not enabled():
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 24, in enabled
import re
File "/usr/lib/python3.6/re.py", line 142, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
Original exception was:
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.6/dist-packages/pip/__main__.py", line 16, in <module>
from pip._internal.cli.main import main as _main # isort:skip # noqa
File "/usr/local/lib/python3.6/dist-packages/pip/_internal/cli/main.py", line 5, in <module>
import locale
File "/usr/lib/python3.6/locale.py", line 16, in <module>
import re
File "/usr/lib/python3.6/re.py", line 142, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/local/lib/python3.6/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-z5g_5ku8/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.
i know my question is bad but i tried
pip3 install SQLAlchemy
pip install -U SQLAlchemy
sudo pip install --upgrade setuptools
sudo apt install python-setuptools
sudo apt install python-dev -y
You probably have enum installed. It's a legacy library and not required. You can probably fix your error with:
pip uninstall -y enum34

Cryptography module not installing

I am working on a project where I need cryptography module for python. When I go to install it (when I run pip install cryptography) I get an error and I dont know how to fix it. Do you have any ideas how to fix this, or any suggestions (is this common, is it a problem with my pip installation):
(venv) C:\Users\PC\Documents\Codes>pip install cryptography
Collecting cryptography
Using cached https://files.pythonhosted.org/packages/be/60/da377e1bed002716fb2d5d1d1cab720f298cb33ecff7bf7adea72788e4e4/cryptography-2.8.tar.gz
Installing build dependencies ... error
Complete output from command C:\Users\PC\Documents\Codes\venv\Scripts\python.exe C:\Users\PC\Documents\Codes\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip install --ignore-installed --no-user --prefix C:\Users\PC\AppData\Local\Temp\pip-build-env-hc0skefe\overlay -
-no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools>=40.6.0 wheel "cffi>=1.8,!=1.11.3; platform_python_implementation != 'PyPy'":
Collecting setuptools>=40.6.0
Using cached https://files.pythonhosted.org/packages/3d/72/1c1498c1e908e0562b1e1cd30012580baa7d33b5b0ffdbeb5fde2462cc71/setuptools-45.2.0-py3-none-any.whl
Collecting wheel
Using cached https://files.pythonhosted.org/packages/8c/23/848298cccf8e40f5bbb59009b32848a4c38f4e7f3364297ab3c3e2e2cd14/wheel-0.34.2-py2.py3-none-any.whl
Collecting cffi!=1.11.3,>=1.8
Using cached https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "C:\Users\PC\Documents\Codes\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\msvc.py", line 489, in _find_latest_available_vc_ver
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\PC\AppData\Local\Temp\pip-install-w8il8_c_\cffi\setup.py", line 127, in <module>
if sys.platform == 'win32' and uses_msvc():
File "C:\Users\PC\AppData\Local\Temp\pip-install-w8il8_c_\cffi\setup.py", line 105, in uses_msvc
return config.try_compile('#ifndef _MSC_VER\n#error "not MSVC"\n#endif')
File "C:\Users\PC\AppData\Local\Programs\Python\Python38-32\lib\distutils\command\config.py", line 225, in try_compile
self._compile(body, headers, include_dirs, lang)
File "C:\Users\PC\AppData\Local\Programs\Python\Python38-32\lib\distutils\command\config.py", line 132, in _compile
self.compiler.compile([src], include_dirs=include_dirs)
File "C:\Users\PC\AppData\Local\Programs\Python\Python38-32\lib\distutils\_msvccompiler.py", line 360, in compile
self.initialize()
File "C:\Users\PC\AppData\Local\Programs\Python\Python38-32\lib\distutils\_msvccompiler.py", line 253, in initialize
vc_env = _get_vc_env(plat_spec)
File "C:\Users\PC\Documents\Codes\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\msvc.py", line 185, in msvc14_get_vc_env
File "C:\Users\PC\Documents\Codes\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\msvc.py", line 843, in __init__
File "C:\Users\PC\Documents\Codes\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\msvc.py", line 485, in __init__
File "C:\Users\PC\Documents\Codes\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\msvc.py", line 492, in _find_latest_available_vc_ver
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\PC\AppData\Local\Temp\pip-install-w8il8_c_\cffi\
----------------------------------------
Command "C:\Users\PC\Documents\Codes\venv\Scripts\python.exe C:\Users\PC\Documents\Codes\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip install --ignore-installed --no-user --prefix C:\Users\PC\AppData\Local\Temp\pip-build-env-hc0skefe\overlay --no-warn-script-locati
on --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools>=40.6.0 wheel "cffi>=1.8,!=1.11.3; platform_python_implementation != 'PyPy'"" failed with error code 1 in None
Thanks in advance!!!!

Categories

Resources