当我尝试安装时odoo-server,出现以下错误:
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)
谁能帮我解决这个问题?
以下是我正在运行的命令:
$ python setup.py bdist_wheel
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
$ pip --version
pip 1.5.6 from /usr/local/lib/python3.4/site-packages (python 3.4)
$ python -c "import setuptools; print(setuptools.__version__)"
2.1
$ python --version
Python 3.4.1
$ which python
/usr/local/bin/python
Run Code Online (Sandbox Code Playgroud)
另外,我正在使用自制的python运行mac
这是我的setup.py脚本:https: //gist.github.com/cloudformdesign/4791c46fe7cd52eb61cd
我疯了 - 我无法弄清楚为什么这不起作用.
我第一次尝试与其他几个网站建立网站,并且在尝试使用Django/Python/VirtualEnv时遇到了一个奇怪的错误.我已经为其他操作系统找到了解决这个问题的方法,比如Ubuntu,但是找不到适合Mac的好解决方案.
这是正在运行的相关代码:
virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt
Run Code Online (Sandbox Code Playgroud)
运行该块后,我收到以下错误:
Asse田
django-toolbelt的构建轮失败为psycopg2运行setup.py bdist_wheel
...
Asse田
psycopg2构建轮失败无法构建django-toolbelt psycopg2
我相信我已经安装了"django-toolbelt"和"psycopg2",所以我不确定它为什么会失败.
我能想到的唯一区别是我没有使用该命令
sudo apt-get install libpq-dev
Run Code Online (Sandbox Code Playgroud)
正如Ubuntu用法的指示,因为我相信用brew安装postgresql会处理标题.
感谢您的帮助或见解!
我尝试在 Ubuntu 20.04.01 上安装 watchman:
guettli@yoga15:~/tmp$ python3 -m venv pywatchman-test
guettli@yoga15:~/tmp$ cd pywatchman-test
guettli@yoga15:~/tmp/pywatchman-test$ . bin/activate
(pywatchman-test) guettli@yoga15:~/tmp/pywatchman-test$ pip install pywatchman
Run Code Online (Sandbox Code Playgroud)
失败:
Collecting pywatchman
Using cached pywatchman-1.4.1.tar.gz (29 kB)
Building wheels for collected packages: pywatchman
Building wheel for pywatchman (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/guettli/tmp/pywatchman-test/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-on_zbadt/pywatchman/setup.py'"'"'; __file__='"'"'/tmp/pip-install-on_zbadt/pywatchman/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-9np2rv_b
cwd: /tmp/pip-install-on_zbadt/pywatchman/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 …Run Code Online (Sandbox Code Playgroud) 嗨,我正在尝试在 python 中安装 ibapi 但是该包似乎不可用,因为每次我尝试安装它时都会出现错误,还有另一种方法可以安装这个包。对你的帮助表示感谢。我留下了我使用的代码。尝试安装软件包
pip install ibapi
Run Code Online (Sandbox Code Playgroud) python algorithmic-trading quantitative-finance interactive-brokers ib-api
在 RHEL 机器上
我有一些旧的 Django 项目要迁移到新服务器,这些项目是为 Python2.6、Django1.4.3 编写的
我已经安装了 python2.7,在我的主目录中创建了 virtualenvs,调整了对 Python 版本的路径和引用。
我为 Python2.7 创建了一个 virtualenv:
virtualenv -p python2.7 ~/.virtualenvs/my_site/
Run Code Online (Sandbox Code Playgroud)
当我激活 virtualenv 然后 cd 进入网站目录并运行
pip install -r requirements.txt
成功获取所有库后,requirements.txt中的每一行都显示以下错误:
Building wheels for collected packages: MySQL-python, Pillow...etc
Running setup.py bdist_wheel for MySQL-python ... error
Complete output from command /home/my_user/.virtualenvs/my_site/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-96k9a4/MySQL-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-ngSbQU --python-tag cp27:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 Pyinstaller 从我的 .py 脚本中构建一个可执行文件。问题是它使用 Python 2.7 而不是 Python 3.5 构建它,所以我的可执行文件甚至无法运行。
cali@californiki-pc ~/Desktop $ pyinstaller --onefile Vocabulary.py
25 INFO: PyInstaller: 3.2.1
25 INFO: Python: 2.7.12
26 INFO: Platform: Linux-4.4.0-72-generic-x86_64-with-LinuxMint-18.1-serena
26 INFO: wrote /home/cali/Desktop/Vocabulary.spec
31 INFO: UPX is not available.
32 INFO: Extending PYTHONPATH with paths
['/home/cali/Desktop', '/home/cali/Desktop']
32 INFO: checking Analysis
33 INFO: Building Analysis because out00-Analysis.toc is non existent
33 INFO: Initializing module dependency graph...
34 INFO: Initializing module graph hooks...
139 INFO: running Analysis out00-Analysis.toc
160 INFO: Caching …Run Code Online (Sandbox Code Playgroud) 我正在尝试按以下方式安装pyspark:
python setup.py install
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
Could not import pypandoc - required to package PySpark
Run Code Online (Sandbox Code Playgroud)
pypandoc已经安装
有什么想法如何安装pyspark?
我正在尝试将一些 Python 代码转换为.exePyInstaller。我的代码使用 distutils,这在过去已经让我有些头疼,因为它似乎重复了 setuptools 的功能,并且与它的交互很奇怪。例如,它需要未使用的setuptools 导入才能正常工作,这对我来说似乎非常不Python。
我需要在我的项目中使用这两个包。我在订单中导入了两个包,import setuptools; import distutils因为另一个订单抛出了一个已经令人担忧的警告。
我的脚本运行良好,但在我将其转换为 exe 后,我在 setuptools 的可疑子模块内得到了回溯_distutils_hack。是的,它只是打印一个没有上下文的文件名。
Traceback (most recent call last):
<18 lines omitted>
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "_distutils_hack\override.py", line 71, in <module>
File "_distutils_hack\__init__.py", line 71, in do_override
File "_distutils_hack\__init__.py", line 59, in ensure_local_distutils
AssertionError: C:\Users\<omitted>\AppData\Local\Temp\_MEI294562\distutils\core.pyc
Run Code Online (Sandbox Code Playgroud)
我在用
Python 3.7.7 on win32(但我用 3.8、3.9 和 3.10 复制了它)pyinstaller==4.8(2022 年 1 月)Windows 版distutils==3.7.7(内置) …python ×8
python-wheel ×3
django ×2
pip ×2
pyinstaller ×2
setuptools ×2
distutils ×1
gcc ×1
ib-api ×1
odoo-server ×1
postgresql ×1
psycopg2 ×1
pyspark ×1
python-2.7 ×1
virtualenv ×1
watchman ×1