我是一名编码初学者,目前正在尝试运行我在一篇研究论文(github here:https://github.com/jdechalendar/tracking_emissions)中找到的一些代码。代码是在Linux环境下编写的,所以我下载了UbuntuforWindows,第一步就是运行setup.py文件来下载一些包,比如numpy和pandas。然而,当代码涉及到“为熊猫构建轮子”时,需要25分钟才能完成大量的红色错误代码块,但我已经粘贴了下面的两个大错误。我不明白为什么这么简单的任务如此困难
我曾尝试在网上寻找许多解决方案,并下载了许多软件包,如libssl、libblas和python3 dev,升级了setuptools和wheel,确保我有gcc等。奇怪的是,我可以通过“apt get”安装pandas,但当我运行研究论文中的代码时,我发现了一个错误“没有名为pandas的模块”
非常感谢您的帮助,我们已经解决这个问题好几天了
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for pandas
Running setup.py clean for pandas
Successfully built tracking-emissions
Failed to build pandas Installing collected packages: pandas, tracking-emissions
Attempting uninstall: pandas
Found existing installation: pandas 1.2.3
Uninstalling pandas-1.2.3:
Successfully uninstalled pandas-1.2.3
Running setup.py install for pandas ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install
n2fkahdv/pandas_9d8e284bb5b849b7bfb72940b77bf16f/setup.py'"'"'; __file__='"'"'/tmp/pip-install
n2fkahdv/pandas_9d8e284bb5b849b7bfb72940b77bf16f/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__,
'"'"'exec'"'"'))' install --record /tmp/pip-record-86n8ifgk/install-record.txt --single-version
externally-managed --compile --install-headers /usr/local/include/python3.8/pandas
cwd: /tmp/pip-install-n2fkahdv/pandas_9d8e284bb5b849b7bfb72940b77bf16f/
我试着用Ubuntu和Powershell来解决一些问题,但都不起作用。由于这是Python的一个问题,我实际上最终下载了Anaconda并使用了Anaconda Powershell提示符。我还下载了chocolatey,以便可以使用命令
make all
。我相信问题在于,对于Ubuntu,我在usr/bin/python
中使用了Python,而对于Anaconda,则是c/Users/[User]/Anaconda/Python
相关问题 更多 >
编程相关推荐