Python 无法为PYM安装secp256k1?

Python 无法为PYM安装secp256k1?,python,ethereum,Python,Ethereum,我得到的错误如下。我已通过以下方式安装了PyTM所需的依赖项: brew install --force pkg-config libffi autoconf automake libtool openssl 我得到的回应是 Warning: pkg-config-0.29.1_2 already installed Warning: libffi-3.0.13 already installed, it's just not linked. Warning: autoconf-2.69 al

我得到的错误如下。我已通过以下方式安装了PyTM所需的依赖项:

brew install --force pkg-config libffi autoconf automake libtool openssl
我得到的回应是

Warning: pkg-config-0.29.1_2 already installed
Warning: libffi-3.0.13 already installed, it's just not linked.
Warning: autoconf-2.69 already installed
Warning: automake-1.15 already installed
Warning: libtool-2.4.6_1 already installed
Warning: openssl-1.0.2k already installed, it's just not linked.
然后,我尝试链接未链接的库:

(ENV) Madhavs-MacBook-Air:pyethereum madhavsharma$ brew unlink libffi && brew link --force libffi
Unlinking /usr/local/Cellar/libffi/3.0.13... 0 symlinks removed
Linking /usr/local/Cellar/libffi/3.0.13... 10 symlinks created
然而,当尝试链接openssl时,我得到了这样的结果

(ENV) Madhavs-MacBook-Air:pyethereum madhavsharma$ brew unlink openssl && brew link --force openssl
Unlinking /usr/local/Cellar/openssl/1.0.2k... 0 symlinks removed
Warning: Refusing to link: openssl
Linking keg-only openssl means you may end up linking against the insecure,
deprecated system OpenSSL while using the headers from Homebrew's openssl.
Instead, pass the full include/library paths to your compiler e.g.:
  -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib
我不完全确定我应该如何解释这条消息,我也不确定为什么会出现下载错误,正如我在下面粘贴的那样。请提供安装PYM的一般指导

(ENV) My-computer:pyethereum user$ pip3 install -r requirements.txt 
Collecting https://github.com/ethereum/ethash/tarball/master (from -r requirements.txt (line 9))
  Downloading https://github.com/ethereum/ethash/tarball/master (76kB)
    100% |████████████████████████████████| 81kB 540kB/s 
Collecting bitcoin (from -r requirements.txt (line 1))
  Using cached bitcoin-1.1.42.tar.gz
Collecting pysha3 (from -r requirements.txt (line 2))
  Using cached pysha3-1.0.2.tar.gz
Collecting PyYAML (from -r requirements.txt (line 3))
  Using cached PyYAML-3.12.tar.gz
Collecting repoze.lru (from -r requirements.txt (line 4))
  Using cached repoze.lru-0.6.tar.gz
Collecting pbkdf2 (from -r requirements.txt (line 5))
  Using cached pbkdf2-1.3.tar.gz
Collecting pycryptodome>=3.3.1 (from -r requirements.txt (line 6))
  Using cached pycryptodome-3.4.5.tar.gz
Collecting scrypt (from -r requirements.txt (line 7))
  Using cached scrypt-0.8.0.tar.gz
Collecting rlp>=0.4.4 (from -r requirements.txt (line 8))
  Using cached rlp-0.4.7.tar.gz
Collecting secp256k1 (from -r requirements.txt (line 10))
  Using cached secp256k1-0.13.2.tar.gz
    Complete output from command python setup.py egg_info:
    0.29.1
    Download error on https://pypi.python.org/simple/pytest-runner/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages may not be found!
    Couldn't find index page for 'pytest-runner' (maybe misspelled?)
    Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages may not be found!
    No local packages or working download links found for pytest-runner==2.6.2
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/c7/m5bh8s6d7nn1prj5x4dk6lp00000gn/T/pip-build-s_ta8_h3/secp256k1/setup.py", line 295, in <module>
        "Topic :: Security :: Cryptography"
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/Users/madhavsharma/Desktop/pyethereum/ENV/lib/python3.6/site-packages/setuptools/dist.py", line 315, in __init__
        self.fetch_build_eggs(attrs['setup_requires'])
      File "/Users/madhavsharma/Desktop/pyethereum/ENV/lib/python3.6/site-packages/setuptools/dist.py", line 361, in fetch_build_eggs
        replace_conflicting=True,
      File "/Users/madhavsharma/Desktop/pyethereum/ENV/lib/python3.6/site-packages/pkg_resources/__init__.py", line 850, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "/Users/madhavsharma/Desktop/pyethereum/ENV/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1122, in best_match
        return self.obtain(req, installer)
      File "/Users/madhavsharma/Desktop/pyethereum/ENV/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1134, in obtain
        return installer(requirement)
      File "/Users/madhavsharma/Desktop/pyethereum/ENV/lib/python3.6/site-packages/setuptools/dist.py", line 429, in fetch_build_egg
        return cmd.easy_install(req)
      File "/Users/madhavsharma/Desktop/pyethereum/ENV/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 659, in easy_install
        raise DistutilsError(msg)
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pytest-runner==2.6.2')

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/c7/m5bh8s6d7nn1prj5x4dk6lp00000gn/T/pip-build-s_ta8_h3/secp256k1/
(ENV)我的电脑:pyethereum用户$pip3安装-r requirements.txt
收集https://github.com/ethereum/ethash/tarball/master (来自-r requirements.txt(第9行))
正在下载https://github.com/ethereum/ethash/tarball/master (76kB)
100% |████████████████████████████████| 81kB 540kB/s
收集比特币(来自-r requirements.txt(第1行))
使用缓存的比特币-1.1.42.tar.gz
收集PYSA3(来自-r requirements.txt(第2行))
使用缓存的pysha3-1.0.2.tar.gz
收集PyYAML(来自-r requirements.txt(第3行))
使用缓存的PyYAML-3.12.tar.gz
正在收集repoze.lru(来自-r requirements.txt(第4行))
使用缓存的repoze.lru-0.6.tar.gz
收集pbkdf2(来自-r requirements.txt(第5行))
使用缓存的pbkdf2-1.3.tar.gz
收集pycryptodome>=3.3.1(来自-r requirements.txt(第6行))
使用缓存的pycryptodome-3.4.5.tar.gz
收集scrypt(来自-r requirements.txt(第7行))
使用缓存的scrypt-0.8.0.tar.gz
收集rlp>=0.4.4(来自-r requirements.txt(第8行))
使用缓存的rlp-0.4.7.tar.gz
收集secp256k1(来自-r requirements.txt(第10行))
使用缓存的secp256k1-0.13.2.tar.gz
从命令python setup.py egg_info完成输出:
0.29.1
上的下载错误https://pypi.python.org/simple/pytest-runner/: [SSL:CERTIFICATE\u VERIFY\u FAILED]证书验证失败(\u SSL.c:749)--可能找不到某些包!
找不到“pytest runner”的索引页(可能拼写错误?)
上的下载错误https://pypi.python.org/simple/: [SSL:CERTIFICATE\u VERIFY\u FAILED]证书验证失败(\u SSL.c:749)--可能找不到某些包!
找不到pytest runner==2.6.2的本地包或工作下载链接
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
文件“/private/var/folders/c7/m5bh8s6d7nn1prj5x4dk6lp0000gn/T/pip-build-s_ta8_h3/secp256k1/setup.py”,第295行,在
“主题::安全::加密”
文件“/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py”,第108行,在安装程序中
_设置\u分布=dist=klass(属性)
文件“/Users/madhavsharma/Desktop/pyethereum/ENV/lib/python3.6/site packages/setuptools/dist.py”,第315行,在__
self.fetch\u build\u鸡蛋(attrs['setup\u requires']))
文件“/Users/madhavsharma/Desktop/pyethereum/ENV/lib/python3.6/site packages/setuptools/dist.py”,第361行,在fetch\u build\u中
替换_=True,
文件“/Users/madhavsharma/Desktop/pyethereum/ENV/lib/python3.6/site packages/pkg_resources/_init___;.py”,第850行,解析
dist=best[req.key]=env.best\u匹配(req,ws,installer)
文件“/Users/madhavsharma/Desktop/pyethereum/ENV/lib/python3.6/site packages/pkg_resources/_init__.py”,第1122行,最佳匹配
返回自获取(请求,安装程序)
文件“/Users/madhavsharma/Desktop/pyethereum/ENV/lib/python3.6/site packages/pkg_resources/_init___;.py”,第1134行,在获取中
返回安装程序(要求)
文件“/Users/madhavsharma/Desktop/pyethereum/ENV/lib/python3.6/site packages/setuptools/dist.py”,第429行,在fetch\u build\u egg中
return cmd.easy_安装(需要)
文件“/Users/madhavsharma/Desktop/pyethereum/ENV/lib/python3.6/site packages/setuptools/command/easy_install.py”,第659行,在easy_install中
raise DistutilsError(消息)
distutils.errors.DistutilsError:找不到适合于Requirement.parse的分发('pytest-runner==2.6.2')
----------------------------------------
命令“python setup.py egg_info”在/private/var/folders/c7/m5bh8s6d7nn1prj5x4dk6lp0000gn/T/pip-build-s_ta8_h3/secp256k1中失败,错误代码为1/

我有点不确定您为什么要使用
--force
进行链接,但首先请在没有force标志的情况下尝试所有操作

其次,我认为您可以忽略链接器警告,因为已有
openssl
可用,因此brew没有链接其他已安装版本

最后,您的上一个问题是由于缺少证书,
pip
不知道如何处理它。解决方法是使用
--索引url
并将http url作为参数传递,然后将其设置为
--可信主机
源,从而忽略
https
,即

pip3 install --index-url=http://pypi.python.org/simple/ --trusted-host pypi.python.org -r requirements.txt
我希望这能帮助你完成这个过程