我正在远程使用CentOS (CentOS LinuxRelation7.5.1804 (Core)) (托管我希望在其上运行python2的服务器),该服务器最初安装了python2。
相反,我安装了python3,但这两个版本的路径似乎都不被识别:
$python
-bash: python: command not found
$python --version
-bash: python: command not found
$which python
/usr/bin/which: no python in (/usr/local/sbin:/usr/local/bin:/usr/s
我正在创建一个叶识别分类器使用CNN,Keras和Tensorflow后端的Windows。我已经安装了Anaconda,Tensorflow,numpy,scipy和keras。
我使用pip3安装了keras:
C:\> pip3 list | grep -i keras
Keras 2.2.4
Keras-Applications 1.0.6
Keras-Preprocessing 1.0.5
然而,当我运行我的项目时,我会得到以下错误
ModuleNotFoundError: No module named 'keras'
为什么找不
我对Linux是个新手,我必须使用一台刚格式化的Linux计算机。我是通过SFTP链接到此服务器的。在格式化这个服务器之前,我在使用python时使用了命令'python‘和'pip’。但是现在看来' python‘使用的是2.7,需要使用'python3’来访问python3.7。
我很确定之前的命令'python‘使用的是3.6版本
pip也是另一个问题。这里的pip指的是2.7,pip3指的是3.X,但即使我使用这些命令和3,更新pip的错误也会让我感到困惑。
> You are using pip version 8.1.1, ho
我在苹果电脑上。我安装了请求模块来进行一些web抓取,但是每当我运行该文件时,它都告诉我它不识别请求模块。然后,我检查了模块是否已经安装,并且已经安装了。我附上了一张截图。
这是错误信息
File "scraper.py", line 1, in <module>
import requests
ImportError: No module named requests
运行openssl version在on上返回标准的openssl,在/usr/bin/openssl中返回OpenSSL 0.9.8zh。
我已经安装了最新的brew brew install openssl。各种文章/文章建议手动链接到/usr/local/bin/openssl或运行brew link --force openssl。其他帖子说不要这样做,运行后也给出了以下警告。
Warning: Refusing to link: openssl
Linking keg-only openssl means you may end up linking against the inse
我已经研究过Python的语音识别,到目前为止它工作得很好。它提供了广泛的软件,但我将使用CMUSphinx,因为它离线工作。CMUSphinx在通过自己的程序cmupshinx_continous启动时是正确安装和工作的。但是当试图编写我自己的Python时,它找不到模块speech_recognition。这很奇怪,因为当我跑步时:
python -m speech_recognition
它工作得很好。但当我开始我的剧本:
import speech_recognition as sr
# obtain audio from the microphone
r = sr.
我正在尝试使用Sphinx来记录我的Python 3代码。下面是我的示例文件:
class MyClass:
"""
Class description
"""
def get_name(self) -> str:
"""
Returns the name of this object as a string.
"""
return "Jim"
我在其中一个.rst文件中的指令是: