This article lists the common problems encountered by users when installing PyODPS as follows, hoping to provide reference when encountering similar problems. Before following the steps below, please try uninstalling and reinstalling PyODPS first. The uninstall step is to execute "pip uninstall pyodps".
1. Warning: XXX not installed, ......
Warning is not Error, Warning is not Error, Warning is not Error, important things are said three times!
Referring to the Warning text, it will tell you what components are needed, which you can install using the pip command.
2. After installation, import odps and report no module named odps
This means that the odps package cannot be loaded. There are several possible situations
-
There are multiple Python versions installed. This is commonly seen when using Homebrew to install a new Python package (instead of the system's own Python) under Mac, or installing both Python 2 and Python 3, or installing CPython and Anaconda/Miniconda at the same time, but not currently using Python. Install PyODPS. To confirm this issue, follow these steps:
- Open the Python command line;
- execute
import site; print(site.getsitepackages())
; - Check that a folder named "odps" exists in each path of the output. If not, confirm the problem.
If the problem is confirmed, use the command line to locate the Python path that needs to be installed, and then execute ./python -m pip install pyodps[full]
.
Available under Mac / Linux
find / -regex '.*/python[^\./-]*' 2>/dev/null
Find out how many Pythons are installed on the machine.
- The Search Path (usually the current directory) contains an odps.py or a folder named odps that contains __init__.py. This file may have been accidentally created by you, or you may have installed a Python package called "odps". For the former, please rename the file after checking. For the latter, try to remove with "pip uninstall odps".
3. After installation "from odps import * " report cannot import name ODPS
First, you need to check whether there is a file named "odps.py" in the current working directory. If it exists, please rename it and then import, otherwise, you can refer to the steps in 2 for troubleshooting.
4. After installation, import odps and report cannot import module odps / odps.xxxx
This is usually due to a dependency issue with PyODPS. Please contact PyODPS technical support DingTalk Group (11701793) and we will try to fix the issue.
Attempts pip install -U jupyter
can resolve most issues in this scenario.
5. Syntax Error when installing
Python version is too low. PyODPS mainstream supports Python 2.7.6+ / Python 3.3+, and supports Python 2.6 at the same time. Python 2.5 and below are not supported. It is recommended to use the mainstream supported version.
6. Permission denied when installing on Mac
try to use
sudo pip install pyodps
7. The sudo installation on Mac still reports Operation not permitted
This is due to System Integrity Protection. Referring to http://stackoverflow.com/questions/32659348/operation-not-permitted-when-on-root-el-capitan-rootless-disabled , reboot the machine and press ⌘+R during reboot. After this run in terminal
csrutil disable
reboot
Install again after that.
8. When using sourceIP is not in the white list
There is a whitelist protection, you can consult the Project Owner.
9. Jupyter front-end UI has problems
You can try uninstalling and reinstalling jupyter, ipywidgets and widgetsnbextension, or try executing in bash
jupyter nbextension enable pyodps/main
Original link: http://click.aliyun.com/m/41050/