错误:命令出错,退出状态为1:python setup.py egg_info检查日志以获得完整的命令输出,同时pip安装遗传算法

2024-05-16 23:18:49 发布

您现在位置:Python中文网/ 问答频道 /正文

我正试图在Anaconda中安装遗传算法,方法如下,但有错误。你能告诉我这个问题吗?谢谢


pip install genetic algorithm

然后我得到以下错误:

(tf_cpu) C:\Users\test>pip install genetic algorithm
Collecting algorithm
  Downloading algorithm-1.2.0-py3-none-any.whl (10 kB)
Collecting genetic
  Downloading genetic-0.1.dev3.tar.gz (5.5 kB)
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\yongn\miniconda3\envs\tf_cpu\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\yongn\\AppData\\Local\\Temp\\pip-install-qm3ds3_2\\genetic_0c5368225ac6428486c14ebef370f1c5\\setup.py'"'"'; __file__='"'"'C:\\Users\\yongn\\AppData\\Local\\Temp\\pip-install-qm3ds3_2\\genetic_0c5368225ac6428486c14ebef370f1c5\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\yongn\AppData\Local\Temp\pip-pip-egg-info-yctesttu'
         cwd: C:\Users\yongn\AppData\Local\Temp\pip-install-qm3ds3_2\genetic_0c5368225ac6428486c14ebef370f1c5\
    Complete output (9 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\yongn\AppData\Local\Temp\pip-install-qm3ds3_2\genetic_0c5368225ac6428486c14ebef370f1c5\setup.py", line 39, in <module>
        packages=find_packages("./"),
      File "C:\Users\yongn\miniconda3\envs\tf_cpu\lib\site-packages\setuptools\__init__.py", line 64, in find
        convert_path(where),
      File "C:\Users\yongn\miniconda3\envs\tf_cpu\lib\distutils\util.py", line 124, in convert_path
        raise ValueError("path '%s' cannot end with '/'" % pathname)
    ValueError: path './' cannot end with '/'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.


Tags: installpippylocaltfwithsetupcpu