only run : from solcx your textimport compile_standard, install_solc
error: Info: Could not find file with the provided pattern
(solidity_web3_venv) PS N:\ppython\file\venv\solidity_web3_venv\Scripts\demos\web3_py_simple_storage> python tets.py
信息: 用提供的模式无法找到文件。
(solidity_web3_venv) PS N:\ppython\file\venv\solidity_web3_venv\Scripts\demos\web3_py_simple_storage> pip show py-solc-x
Name: py-solc-x
Version: 1.1.1
Summary: Python wrapper and version management tool for the solc Solidity compiler.
Home-page: https://github.com/iamdefinitelyahuman/py-solc-x
Author: Ben Hauser (forked from py-solc by Piper Merriam)
Author-email: ben#hauser.id
License: MIT
Location: n:\ppython\file\venv\solidity_web3_venv\lib\site-packages
Requires: requests, semantic-version
Required-by:
There's no problem with the interpreter.
The virtual environment is created, the interpreter is OK, and the pip download location is OK.
Related
I'm setting up my requirements.txt, and I see that in my development environment I have "pyodbc==4.0.0-unsupported".
> pip show pyodbc
Name: pyodbc
Version: 4.0.0-unsupported
Summary: DB API Module for ODBC
Home-page: https://github.com/mkleehammer/pyodbc
Author: None
Author-email: None
License: MIT
Location: /local_disk0/.ephemeral_nfs/envs/pythonEnv-02ceb239-f645-45e1-ad42-93017835482c/lib/python3.7/site-packages
Requires:
Required-by:
What does it mean?
I'm using Python 3.7
Isn't it weird that pip installs an old version (2016) of this package?
I'm still getting used to poetry so I'm hoping that I'm doing something wrong. For some reason, after running poetry install, it looks like not all the packages that I depend on end up in the virtual environment. See the below output:
$ poetry run pip show boto3
Name: boto3
Version: 1.18.29
Summary: The AWS SDK for Python
Home-page: https://github.com/boto/boto3
Author: Amazon Web Services
Author-email: None
License: Apache License 2.0
Location: /home/stian/.cache/pypoetry/virtualenvs/some_virtualenv-py3.8/lib/python3.8/site-packages
Requires: s3transfer, jmespath, botocore
Required-by: moto
$ poetry run pip show pluggy
Name: pluggy
Version: 0.13.1
Summary: plugin and hook calling mechanisms for python
Home-page: https://github.com/pytest-dev/pluggy
Author: Holger Krekel
Author-email: holger#merlinux.eu
License: MIT license
Location: /nix/store/l2i2x3g16g6dbwsw4iii614dh3xqgg9m-python3.8-pluggy-0.13.1/lib/python3.8/site-packages
Requires:
Required-by: tox, pytest
Why does this happen? I'm using NixOS, but I'm hoping that's not the cause. To be clear: What I wish is for the "Location" for the pluggy package to also be within the "/home/stian/.cache/pypoetry/virtualenvs/some_virtualenv-py3.8/lib/python3.8/site-packages", as it is for the boto3 package.
I installed OR Tools on my mac with pip install ortools. Now I try to run the example code given by Google on https://developers.google.com/optimization/routing/vrp#solution.
At the import from ortools.constraint_solver import pywrapcp the program crashes with the following message:
[libprotobuf FATAL google/protobuf/stubs/common.cc:86] This program was compiled against version 3.5.1 of the Protocol Buffer runtime library, which is not compatible with the installed version (3.7.1). Contact the program author for an update. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in "ortools/gen/ortools/data/rcpsp.pb.cc".)
libc++abi.dylib: terminating with uncaught exception of type google::protobuf::FatalException: This program was compiled against version 3.5.1 of the Protocol Buffer runtime library, which is not compatible with the installed version (3.7.1). Contact the program author for an update. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in "ortools/gen/ortools/data/rcpsp.pb.cc".)
I deleted version 3.7.1 of protobuf and installed 3.5.1 with the help of pip:
Name: protobuf
Version: 3.5.1
Summary: Protocol Buffers
Home-page: https://developers.google.com/protocol-buffers/
Author: protobuf#googlegroups.com
Author-email: protobuf#googlegroups.com
License: 3-Clause BSD License
Location: /Users/Martijn/anaconda/lib/python3.5/site-packages
Requires: setuptools, six
But I still get the same error message.. Anyone experience with this problem?
OR Tools:
Name: ortools
Version: 6.7.4973
Summary: Google OR-Tools python libraries and modules
Home-page: https://developers.google.com/optimization/
Author: Google Inc
Author-email: lperron#google.com
License: Apache 2.0
Location: /Users/Martijn/anaconda/lib/python3.5/site-packages
Requires: six, protobuf
For some reason I cannot upgrade to a newer version of OR Tools with pip.
Can you upgrade to python 3.6 ?
Latest version (7.0) supports 2.7, 3.7, and 3.7 on mac.
Please note that they were build with 3.6.1.
Next version will include 3.7.1.
I am following the introductory guide on Tensorflow at https://www.tensorflow.org/guide/low_level_intro, and managed to create an 'events.out' file by using
writer = tf.summary.FileWriter('.')
writer.add_graph(tf.get_default_graph())
writer.flush()
in my python file and running it. The next step is to launch Tensorboard in a 'terminal' with the 'shell command' tensorboard --logdir. How to do this? What terminal am I supposed to use? I tried windows powershell but it does not seem to work. It gives the error
tensorboard : The term 'tensorboard' is not recognized as the name of
a cmdlet, function, script file, or operable prog ram. Check the
spelling of the name, or if a path was included, verify that the path
is correct and try again. At line:1 char:1
+ tensorboard --logdir
+ ~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (tensorboard:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Using PowerShell is fine. It sounds like your PATH is not configured to find the Tensorboard binary like others are saying. Can you show me what you get for pip show tensorflow? It should have something like below:
(1) ➜ ~ pip show tensorflow
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Name: tensorflow
Version: 1.12.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: opensource#google.com
License: Apache 2.0
Location: c:\users\stephanwlee\venv\tf\lib\site-packages
Requires: enum34, keras-preprocessing, wheel, astor, backports.weakref, mock, tensorboard, termcolor, protobuf, gast, absl-py, grpcio, six, keras-applications, numpy
Required-by:
In above output, location is the important piece that tells you where binaries are roughly gets placed. If you are using virtualenv like the TensorFlow installation guide (everything should be set up seamlessly and I would recommend you to use it), the binaries should be in c:\users\stephanwlee\venv\tf\Scripts. Please check and see if the path is in $env:path.
If any of these didn't help, please do add result of pip show tensorflow and $env:path from PowerShell in the response, thanks!
pip show tensorflow
Name: tensorflow
Version: 2.7.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: packages#tensorflow.org
License: Apache 2.0
Location: c:\users\luis\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages
Requires: absl-py, astunparse, flatbuffers, gast, google-pasta, grpcio, h5py, keras, keras-preprocessing, libclang, numpy, opt-einsum, protobuf, six, tensorboard, tensorflow-estimator, tensorflow-io-gcs-filesystem, termcolor, typing-extensions, wheel, wrapt
Required-by:
LUIS#XEONE5-2620-v2 ~
❯
LUIS#XEONE5-2620-v2 ~
❯ $env:path
C:\Program Files\Microsoft MPI\Bin\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\mingw64\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Azure Data Studio\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files\MiKTeX\miktex\bin\x64\;C:\Program Files (x86)\Cracklock\Bin;C:\Users\LUIS\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Azure Data Studio\bin;;C:\Users\LUIS\AppData\Local\Programs\oh-my-posh\bin;C:\Users\LUIS\AppData\Local\Programs\oh-my-posh\themes;D:\Program Files\Microsoft VS Code\bin
I'm trying resolve a behavior difference between two python installations that are usually deterministic and have the same python pip packages installed.
I suspect different .so files. Is there a why to see which binaries binary wheels pip has installed, and for which architectures?
Update --
% pip show
Name: scipy
Version: 1.0.0rc1
Summary: SciPy: Scientific Library for Python
Home-page: https://www.scipy.org
Author: SciPy Developers
Author-email: scipy-dev#python.org
License: BSD
Location: /usr/local/lib/python2.7/dist-packages
Requires: numpy
The above package depends on things like libopenblas which must be compiled. I'm not sure if pip used the system installation, or compiled BLAS during a pip install, or used as precompiled version of BLAS for a i386, or i686 -- who knows.
The above case I have:
/usr/local/lib/python2.7/dist-packages/scipy/.libs/libopenblasp-r0-39a31c03.2.18.so
I'd like to see which package have differences in their installed .sos in difference systems.
The information is there, but you'll have to dig around in dist-info and/or egg-info subdirectories to find it.
Binary distributions include a RECORD file in their metadata subdirectory.
Source distributions include an installed-files.txt file in their metadata subdirectory.
The RECORD files are csv lines of (path, hash, size) as documented in PEP-376. The older installed-files.txt from an egg is just the filenames, and you'll have to stat those files manually.
As a simple example, I have source and binary distributions of my package copyingmock available on PyPI. With the binary distribution installed (pip install copyingmock):
$ pip show --files copyingmock
Name: copyingmock
Version: 0.1
Summary: A subclass of MagicMock that copies the arguments
Home-page: https://github.com/wimglenn/copyingmock
Author: Wim Glenn
Author-email: hey#wimglenn.com
License: MIT
Location: /tmp/blah/venv/lib/python3.6/site-packages
Requires:
Files:
__pycache__/copyingmock.cpython-36.pyc
copyingmock-0.1.dist-info/DESCRIPTION.rst
copyingmock-0.1.dist-info/INSTALLER
copyingmock-0.1.dist-info/LICENSE.txt
copyingmock-0.1.dist-info/METADATA
copyingmock-0.1.dist-info/RECORD
copyingmock-0.1.dist-info/WHEEL
copyingmock-0.1.dist-info/metadata.json
copyingmock-0.1.dist-info/top_level.txt
copyingmock.py
$ cat venv/lib/python3.6/site-packages/copyingmock-0.1.dist-info/RECORD
copyingmock.py,sha256=DoLAuaS7KqGT87BIlD93G1M7q9bNWgHYu1m1TZP1D1g,345
copyingmock-0.1.dist-info/DESCRIPTION.rst,sha256=L_0CS_8XNYgAVfq3tj3GZEYg_9vML9nDP-FUU37GIbs,1541
copyingmock-0.1.dist-info/LICENSE.txt,sha256=sDdX5cBRRpk3rmZ8hbYEfAUIYRdDqrlXmChOUkqf62o,1066
copyingmock-0.1.dist-info/METADATA,sha256=bKJ5RXwvj0rGrg22p4K91WiJoLM5MqLHYqlpWYWUhPU,2031
copyingmock-0.1.dist-info/RECORD,,
copyingmock-0.1.dist-info/WHEEL,sha256=5wvfB7GvgZAbKBSE9uX9Zbi6LCL-_KgezgHblXhCRnM,113
copyingmock-0.1.dist-info/metadata.json,sha256=SLtuqq4tUGr0A2h4hQnZEdPIm_4MrvcunLzP-_1I7Qc,677
copyingmock-0.1.dist-info/top_level.txt,sha256=X3FsY_0npOxR5rKvOJ-b2rdiNfSiIivwVKN4JgY7cac,12
copyingmock-0.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
__pycache__/copyingmock.cpython-36.pyc,,
Then forcing to reinstall with the source distribution (pip uninstall copyingmock and then pip install --no-binary=copyingmock copyingmock):
$ pip show --files copyingmock
Name: copyingmock
Version: 0.1
Summary: A subclass of MagicMock that copies the arguments
Home-page: https://github.com/wimglenn/copyingmock
Author: Wim Glenn
Author-email: hey#wimglenn.com
License: MIT
Location: /tmp/blah/venv/lib/python3.6/site-packages
Requires:
Files:
__pycache__/copyingmock.cpython-36.pyc
copyingmock-0.1-py3.6.egg-info/PKG-INFO
copyingmock-0.1-py3.6.egg-info/SOURCES.txt
copyingmock-0.1-py3.6.egg-info/dependency_links.txt
copyingmock-0.1-py3.6.egg-info/top_level.txt
copyingmock.py
$ cat venv/lib/python3.6/site-packages/copyingmock-0.1-py3.6.egg-info/installed-files.txt
../copyingmock.py
../__pycache__/copyingmock.cpython-36.pyc
dependency_links.txt
PKG-INFO
top_level.txt
SOURCES.txt