pip – How can a Google Cloud Python function access a private Python package?

  1. I'm using the Google Cloud feature with Python. Several other functions are in production.
  2. For this purpose, however, I also created a custom Python package that is available on github as Private Repo.
  3. I have to install the package in the Google function

WHAT HAVE I DONE

  1. I run the Google function locally functions-framework
  2. I have a require.txt that contains a link to the package. This is done by adding the following line to requirements.txt::
    -e git+https://github.com//#egg=
  1. I run pip install -r requirements.txt. And the package was installed successfully.
  2. Now in the Python code of the function with import works and I can access all functions.

CHALLENGES IN PRESSING THE FUNCTION ON THE CLOUD

  1. To transfer the cloud function to the Google Cloud, I issue the following command according to the documentation:
gcloud functions 
  deploy  
  --trigger-http  
  --entry-point  
  --runtime python37 
  --project=

As expected, this issues an error because it doesn't have access to the private repo in Git.

  1. I created a Google Cloud Repository and linked it to the Git repo in the hope that I could somehow specify this in the resources.txt file. Just don't know how.

  2. I tried to set username and password environment variables (not a good idea, because I agree) in the Google Cloud function and these in the requirements.txt how:

    -e git+https://${AUTH_USER}:${AUTH_PASSWORD}@github.com//#egg=

That also gave an error.

Any help or instruction is greatly appreciated.

Wallet – If you have a problem with Python code, Bitcoin (Pip Install Bitcoin), the area where I think my problem is is in bold

I want to save a wallet, here is a small code as an example, I do not know where the code starts or ends here and whether it should be inserted into the command interface or the text editor as mentioned with a .py extension: also where it says how would you save these together between the < > Here is the code below:

from the Bitcoin import * my_private_key = random_key () print (my_private_key) Save it as a .py file and then open your command line program and run the above program as follows.

I used parentheses above instead of the side v key when you hold down the shift key or the and key. Key because for some reason I can't enter this key here

python – Pip: Installation of a newer module version with the option "–user"

Scenario:

A python package abc is installed as a system package, e.g. to /usr/lib or /usr/local/... (either sudo pip install abc or via the system package manager).

A higher version of the abc package is also installed pip as a user package: pip install abc --user,

Which version is effective for this particular user?

python – How do I run a package installed with `python3 -m pip install …`?

I installed the Jupyter notebook with a command like this:

python3.6 -m pip install notebook

It continues without a problem.

Now i want to run it if you use traditionally pip, you get a Simlink somewhere, with which you can simply execute the binary file of the module. In this case it would be:

jupyter notebook

But for obvious reasons that doesn't work.

I tried to look for something like: python3.6 -m pip run notebook, but there is no such thing.

I found where the module files are located (.local/lib/python...), but I haven't found a way to start it from there.

How am I supposed to do that now?

PSA. I am not looking for something else or to find an alternative way to operate the jupyter notebook, I want to know how to do this thing as it is, This is because I want to learn more about pip's behavior in this situation.

python – For every PIP installation SSL: CERTIFICATE_VERIFY_FAILED error

I'm new to Linux / Ubuntu. An attempt was made to set up Python (for Ansible control systems).
As part of this setup, I need to install xmltodict and markupsafe. I think i miss some configuration setup part. Ask for advice.

Env #
Windows 10 with Virtualbox, on the Ubuntu 18.x vbox.
pip –version (pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)

pip install xmltodict

No suitable distribution found for xmltodict
Exception information:
Tracing (last call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
status = self.run (options, arguments)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 353, is executed
wb.build (Autobuilding = True)
File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files (self.finder)
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies = self.ignore_dependencies))
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 554, in _prepare_file
require_hashes
File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 278, in populate_link
self.link = finder.find_requirement (self, upgrade)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 514, in find_requirement
& # 39; No matching distribution found for% s & # 39;% req
DistributionNotFound: No suitable distribution found for xmltodict

RESULTS PI / PIP NOV 2019

Finalized 11/15/19 and waiting for more notifications. NY, USA YouTube Adsense Partner Publishing. Will keep everyone up to date. Happy Piping

Edit] I think this was posted in the wrong sub-thread. Adsense> Payments. Can someone clarify if this can be postponed, if so? Sorry and thanks !!

python – Error installing jupyter with: pip install jupyter

Here is the error:
ERROR: Command with exit status 1 error:
Command: c: users koran appdata local programs python python38 python.exe & # 39; -c # import sys, setuptools, tokenize; sys.argv (0) = & # 39; "& # 39;" C: Users koran AppData Local Temp pip-install-djxv81ze pywinpty setup.py & # 39; "& # 39;" & # 39 ;; file= & # 39; & quot; & # 39; & quot; & # 39; C: Users koran AppData Local Temp pip-install -djxv81ze pywinpty setup.py & # 39; "" & # 39 ;; f = getattr (tokenize, & # 39; "& # 39;" & # 39; open & # 39; "& # 39; open) (file); code = f.read (). replace (& # 39; "& # 39;" & # 39; "& # 39;" & # 39; "& # 39;" & # 39; "& # 39;" & # 39; "& # 39;" & # 39; "& # 39;" & # 39; "& # 39;" & # 39; ; & # 39; & # 39;; f.close (); exec (compile (code, file, & # 39; & quot; & # 39; & quot; & # 39; exec & # 39; "& # 39;")) & # 39; egg_info –egg-base pip-egg-info
cwd: C: users koran AppData Local temp pip-install-djxv81ze pywinpty
Complete output (161 lines):
Compile C: Users koran AppData Local Temp easy_install-qhgzcok8 Cython-0.29.14 Cython Plex Scanners.py as it has been modified.
Compile C: Users koran AppData Local Temp easy_install -qhgzcok8 Cython-0.29.14 Cython Plex Actions.py as it has been modified.
Compile C: Users koran AppData Local Temp easy_install -qhgzcok8 Cython-0.29.14 Cython Compiler Scanning.py as it has been modified.
Compile C: Users koran AppData Local Temp easy_install -qhgzcok8 Cython-0.29.14 Cython Compiler Visitor.py as it has been modified.
Compile C: Users koran AppData Local Temp easy_install -qhgzcok8 Cython-0.29.14 Cython Compiler FlowControl.py because it has been modified.
Compile C: Users koran AppData Local Temp easy_install-qhgzcok8 Cython-0.29.14 Cython Runtime refnanny.pyx because it has changed.
Compile C: Users koran AppData Local Temp easy_install -qhgzcok8 Cython-0.29.14 Cython Compiler FusedNode.py because it has been modified.
Compile C: Users koran AppData Local Temp easy_install-qhgzcok8 Cython-0.29.14 Cython Tempita_tempita.py because it has been modified.
(1/8) Cythonizing C: Users koran AppData Local Temp easy_install-qhgzcok8 Cython-0.29.14 Cython Compiler FlowControl.py
(2/8) Cythonizing C: Users koran AppData Local Temp easy_install-qhgzcok8 Cython-0.29.14 Cython Compiler FusedNode.py
(3/8) Cythonizing C: Users koran AppData Local Temp easy_install-qhgzcok8 Cython-0.29.14 Cython Compiler Scanning.py
(4/8) Cythonizing C: Users koran AppData Local Temp easy_install-qhgzcok8 Cython-0.29.14 Cython Compiler Visitor.py
(5/8) Cythonizing C: Users koran AppData Local Temp easy_install-qhgzcok8 Cython-0.29.14 Cython Plex Actions.py
(6/8) Cythonizing C: Users koran AppData Local Temp easy_install-qhgzcok8 Cython-0.29.14 Cython Plex Scanners.py
(7/8) Cythonizing C: Users koran AppData Local Temp easy_install-qhgzcok8 Cython-0.29.14 Cython Runtime refnanny.pyx
(8/8) Cythonizing C: Users koran AppData Local Temp easy_install-qhgzcok8 Cython-0.29.14 Cython Tempita_tempita.py
Pgen can not be found, formal grammar is not compiled.
Warning: No files found with & # 39; Doc * & # 39; to match.
Warning: No matching files found.pyx in the directory & # 39; Cython Debugger Tests & # 39;
Warning: No matching files found
.pxd in the directory & # 39; Cython Debugger Tests & # 39;
Warning: No files found with & # 39; * .pxd & # 39; in the directory & # 39; Cython Utility & # 39; to match.
Warning: No files matching "pyximport README" were found.
Tracing (last call last):
File "c: users koran appdata local programs python python38 lib site-packages setuptools msvc.py", line 489, in _find_latest_available_vc_ver
return self.find_available_vc_vers () (- 1)
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:userskoranappdatalocalprogramspythonpython38libdistutilscore.py", line 148, in setup
    dist.run_commands()
  File "c:userskoranappdatalocalprogramspythonpython38libdistutilsdist.py", line 966, in run_commands
    self.run_command(cmd)
  File "c:userskoranappdatalocalprogramspythonpython38libdistutilsdist.py", line 985, in run_command
    cmd_obj.run()
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolscommandbdist_egg.py", line 172, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolscommandbdist_egg.py", line 158, in call_command
    self.run_command(cmdname)
  File "c:userskoranappdatalocalprogramspythonpython38libdistutilscmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:userskoranappdatalocalprogramspythonpython38libdistutilsdist.py", line 985, in run_command
    cmd_obj.run()
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolscommandinstall_lib.py", line 11, in run
    self.build()
  File "c:userskoranappdatalocalprogramspythonpython38libdistutilscommandinstall_lib.py", line 107, in build
    self.run_command('build_ext')
  File "c:userskoranappdatalocalprogramspythonpython38libdistutilscmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:userskoranappdatalocalprogramspythonpython38libdistutilsdist.py", line 985, in run_command
    cmd_obj.run()
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolscommandbuild_ext.py", line 84, in run
    _build_ext.run(self)
  File "c:userskoranappdatalocalprogramspythonpython38libdistutilscommandbuild_ext.py", line 340, in run
    self.build_extensions()
  File "c:userskoranappdatalocalprogramspythonpython38libdistutilscommandbuild_ext.py", line 449, in build_extensions
    self._build_extensions_serial()
  File "c:userskoranappdatalocalprogramspythonpython38libdistutilscommandbuild_ext.py", line 474, in _build_extensions_serial
    self.build_extension(ext)
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolscommandbuild_ext.py", line 205, in build_extension
    _build_ext.build_extension(self, ext)
  File "c:userskoranappdatalocalprogramspythonpython38libdistutilscommandbuild_ext.py", line 528, in build_extension
    objects = self.compiler.compile(sources,
  File "c:userskoranappdatalocalprogramspythonpython38libdistutils_msvccompiler.py", line 360, in compile
    self.initialize()
  File "c:userskoranappdatalocalprogramspythonpython38libdistutils_msvccompiler.py", line 253, in initialize
    vc_env = _get_vc_env(plat_spec)
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolsmsvc.py", line 185, in msvc14_get_vc_env
    return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolsmsvc.py", line 843, in __init__
    self.si = SystemInfo(self.ri, vc_ver)
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolsmsvc.py", line 485, in __init__
    self.vc_ver = vc_ver or self._find_latest_available_vc_ver()
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolsmsvc.py", line 492, in _find_latest_available_vc_ver
    raise distutils.errors.DistutilsPlatformError(err)
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolssandbox.py", line 154, in save_modules
    yield saved
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolssandbox.py", line 195, in setup_context
    yield
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolssandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolssandbox.py", line 45, in _execfile
    exec(code, globals, locals)
  File "C:UserskoranAppDataLocalTempeasy_install-qhgzcok8Cython-0.29.14setup.py", line 228, in 
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptools__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "c:userskoranappdatalocalprogramspythonpython38libdistutilscore.py", line 163, in setup
    raise SystemExit("error: " + str(msg))
SystemExit: error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolscommandeasy_install.py", line 1144, in run_setup
    run_setup(setup_script, args)
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolssandbox.py", line 253, in run_setup
    raise
  File "c:userskoranappdatalocalprogramspythonpython38libcontextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolssandbox.py", line 195, in setup_context
    yield
  File "c:userskoranappdatalocalprogramspythonpython38libcontextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolssandbox.py", line 166, in save_modules
    saved_exc.resume()
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolssandbox.py", line 141, in resume
    six.reraise(type, exc, self._tb)
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptools_vendorsix.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolssandbox.py", line 154, in save_modules
    yield saved
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolssandbox.py", line 195, in setup_context
    yield
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolssandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolssandbox.py", line 45, in _execfile
    exec(code, globals, locals)
  File "C:UserskoranAppDataLocalTempeasy_install-qhgzcok8Cython-0.29.14setup.py", line 228, in 
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptools__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "c:userskoranappdatalocalprogramspythonpython38libdistutilscore.py", line 163, in setup
    raise SystemExit("error: " + str(msg))
SystemExit: error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 1, in 
  File "C:UserskoranAppDataLocalTemppip-install-djxv81zepywinptysetup.py", line 68, in 
    setup(
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptools__init__.py", line 144, in setup
    _install_setup_requires(attrs)
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptools__init__.py", line 139, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolsdist.py", line 716, in fetch_build_eggs
    resolved_dists = pkg_resources.working_set.resolve(
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagespkg_resources__init__.py", line 780, in resolve
    dist = best(req.key) = env.best_match(
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagespkg_resources__init__.py", line 1065, in best_match
    return self.obtain(req, installer)
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagespkg_resources__init__.py", line 1077, in obtain
    return installer(requirement)
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolsdist.py", line 786, in fetch_build_egg
    return cmd.easy_install(req)
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolscommandeasy_install.py", line 679, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolscommandeasy_install.py", line 705, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolscommandeasy_install.py", line 890, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolscommandeasy_install.py", line 1158, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "c:userskoranappdatalocalprogramspythonpython38libsite-packagessetuptoolscommandeasy_install.py", line 1146, in run_setup
    raise DistutilsError("Setup script exited with %s" % (v.args(0),))
distutils.errors.DistutilsError: Setup script exited with error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------

ERROR: Command failed with exit state 1: python setup.py egg_info Check the logs for complete command output.

pip install mysql-python throws an error

I'm on MacOS Mojave 10.14.6 (18G103).
When I try to install mysql-python, an error is thrown:

$ pip install --upgrade setuptools
Requirement already up-to-date: setuptools in /usr/local/lib/python2.7/site-packages (41.5.1)
$ pip install mysql-python
Collecting mysql-python
  Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip
    Complete output from command python setup.py egg_info:
    sh: mysql_config: command not found
    Traceback (most recent call last):
      File "", line 1, in 
      File "/private/var/folders/90/6l6jqf191f74hg282swdz5080000gn/T/pip-install-RetBjz/mysql-python/setup.py", line 17, in 
        metadata, options = get_config()
      File "setup_posix.py", line 43, in get_config
        libs = mysql_config("libs_r")
      File "setup_posix.py", line 25, in mysql_config
        raise EnvironmentError("%s not found" % (mysql_config.path,))
    EnvironmentError: mysql_config not found

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/90/6l6jqf191f74hg282swdz5080000gn/T/pip-install-RetBjz/mysql-python/