我在 ubuntu 18.04 上运行 python3.9。我已经继续执行命令sudo apt-get install python-scipy并收到消息:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-scipy is already the newest version (0.19.1-2ubuntu1).
The following packages were automatically installed and are no longer required:
linux-hwe-5.4-headers-5.4.0-42 linux-hwe-5.4-headers-5.4.0-53
linux-hwe-5.4-headers-5.4.0-56 linux-hwe-5.4-headers-5.4.0-58
linux-hwe-5.4-headers-5.4.0-59 linux-hwe-5.4-headers-5.4.0-60
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.
Run Code Online (Sandbox Code Playgroud)
然而,当我尝试运行使用的 python3.9 代码时from scipy import integrate,我收到错误:
ModuleNotFoundError: No module named 'scipy'
Run Code Online (Sandbox Code Playgroud)
我已经阅读了这篇文章并尝试使用卸载和安装 …
numpy:1.17.3 joblib:1.1.0 scipy:1.7.3
我正在使用 joblib 加载我训练的短剧学习模型(顺便说一句,我使用 python 3.9 在我的机器中本地创建了该模型)。但是,我收到以下错误:
Traceback (most recent call last):
File \"/home/site/wwwroot/sortierung/__init__.py\", line 51, in main
prediction_file_path)
File \"/home/site/wwwroot/shared_code/custom_functions_prediction.py\", line 255, in predict
result.update(classify_mail(m,s,X, stop_words, model_folder_path))
File \"/home/site/wwwroot/shared_code/custom_functions_prediction.py\", line 105, in classify_mail
model = load(modelFilePath)
File \"/home/site/wwwroot/.python_packages/lib/site-packages/joblib/numpy_pickle.py\", line 587, in load
obj = _unpickle(fobj, filename, mmap_mode)
File \"/home/site/wwwroot/.python_packages/lib/site-packages/joblib/numpy_pickle.py\", line 506, in _unpickle
obj = unpickler.load()
File \"/usr/local/lib/python3.7/pickle.py\", line 1088, in …Run Code Online (Sandbox Code Playgroud)