Category : git

I try to open .py file with MINGW64. File 1: myname.py # myname.py def get_name(): return "Jim" File 2: hello.py: # hello.py import myname name = myname.get_name() print("hello {}".format(name)) When I try to execute hello.py in MINGW64 shell, this error happens: [email protected] MINGW64 ~/Desktop/Python moje projekty/Dev/apiarena_django/git (master) $ ./hello.py ./hello.py: line 2: import: command not ..

Read more

I’m working on a script for cloning a git repo. But i have the following errors: Traceback (most recent call last): File "script.py", line 313, in <module> analysis = Analyzer(repo, mfPath, qPath, ssPath, ssPropertiesPath) File "script.py", line 21, in __init__ self._set_conf() File "script.py", line 26, in _set_conf self._configure_repo() File "script.py", line 98, in _configure_repo self._git_clone() ..

Read more

I’m working on Ubuntu 20.04 and I want to install a package from some repo in python. pip3 install git+https://path-to-repo.git this should have worked fine because when I do pip3 show package_name the package is found. However: > python3 Python 3.8.2 (default, Mar 13 2020, 10:14:16) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or ..

Read more

I added this to pre-commit-config.yml – repo: local hooks: – id: python-hook name: python-hook entry: python python_script.py language: python pass_filenames: false Where python_script.py has the following content #!/usr/bin/env python import os print(os.environ["VIRTUAL_ENV"]) import requests The package requests is installed inside the active virtual environment, when I run pre-commit I get this output /path/to/home/.cache/pre-commit/repouecs3sp4/py_env-python3.7 Traceback (most ..

Read more