markmou
December 12, 2020, 5:24am
1
Hi all,
I am trying to use the python SDK in a new project, the dev box is a windows 10 machine, I always get an error while installing the dependecies in both python 3.6.8 / 3.7.4. But on an ubuntu 18.04 machine, it works fine. The error message I've got is something like this:
copying PureCloudPlatformClientV2\models\wfm_historical_adherence_calculations_complete_topic_wfm_historical_adherence_calculations_complete_notice.py -> build\lib\PureClo
udPlatformClientV2\models
error: could not create 'build\lib\PureCloudPlatformClientV2\models\wfm_historical_adherence_calculations_complete_topic_wfm_historical_adherence_calculations_complete_not
ice.py': No such file or directory
Here is the full logs:
(venv) E:\git\pct>pip install -r requirements_dev.txt
Requirement already satisfied: pytest in e:\git\pct\venv\lib\site-packages (from -r requirements_dev.txt (line 4)) (6.1.2)
Collecting coverage
Downloading coverage-5.3-cp37-cp37m-win_amd64.whl (208 kB)
|████████████████████████████████| 208 kB 273 kB/s
Collecting Flask
Downloading Flask-1.1.2-py2.py3-none-any.whl (94 kB)
|████████████████████████████████| 94 kB 589 kB/s
Requirement already satisfied: Werkzeug>=0.15 in e:\git\pct\venv\lib\site-packages (from Flask->-r requirements_dev.txt (line 2)) (1.0.1)
Requirement already satisfied: Jinja2>=2.10.1 in e:\git\pct\venv\lib\site-packages (from Flask->-r requirements_dev.txt (line 2)) (2.11.2)
Requirement already satisfied: itsdangerous>=0.24 in e:\git\pct\venv\lib\site-packages (from Flask->-r requirements_dev.txt (line 2)) (1.1.0)
Requirement already satisfied: click>=5.1 in e:\git\pct\venv\lib\site-packages (from Flask->-r requirements_dev.txt (line 2)) (7.1.2)
Collecting Mock
Downloading mock-4.0.3-py3-none-any.whl (28 kB)
Collecting PureCloudPlatformClientV2
Downloading PureCloudPlatformClientV2-104.0.2.tar.gz (1.5 MB)
|████████████████████████████████| 1.5 MB 2.2 MB/s
Requirement already satisfied: urllib3>=1.15 in e:\git\pct\venv\lib\site-packages (from PureCloudPlatformClientV2->-r requirements_dev.txt (line 6)) (1.26.2)
Requirement already satisfied: six>=1.10 in e:\git\pct\venv\lib\site-packages (from PureCloudPlatformClientV2->-r requirements_dev.txt (line 6)) (1.15.0)
Requirement already satisfied: certifi in e:\git\pct\venv\lib\site-packages (from PureCloudPlatformClientV2->-r requirements_dev.txt (line 6)) (2020.12.5)
Requirement already satisfied: python-dateutil in e:\git\pct\venv\lib\site-packages (from PureCloudPlatformClientV2->-r requirements_dev.txt (line 6)) (2.8.1)
Requirement already satisfied: packaging in e:\git\pct\venv\lib\site-packages (from pytest->-r requirements_dev.txt (line 4)) (20.7)
Requirement already satisfied: attrs>=17.4.0 in e:\git\pct\venv\lib\site-packages (from pytest->-r requirements_dev.txt (line 4)) (20.3.0)
Requirement already satisfied: atomicwrites>=1.0 in e:\git\pct\venv\lib\site-packages (from pytest->-r requirements_dev.txt (line 4)) (1.4.0)
Requirement already satisfied: pluggy<1.0,>=0.12 in e:\git\pct\venv\lib\site-packages (from pytest->-r requirements_dev.txt (line 4)) (0.13.1)
Requirement already satisfied: iniconfig in e:\git\pct\venv\lib\site-packages (from pytest->-r requirements_dev.txt (line 4)) (1.1.1)
Requirement already satisfied: colorama in e:\git\pct\venv\lib\site-packages (from pytest->-r requirements_dev.txt (line 4)) (0.4.4)
Requirement already satisfied: importlib-metadata>=0.12 in e:\git\pct\venv\lib\site-packages (from pytest->-r requirements_dev.txt (line 4)) (3.1.1)
Requirement already satisfied: toml in e:\git\pct\venv\lib\site-packages (from pytest->-r requirements_dev.txt (line 4)) (0.10.2)
Requirement already satisfied: py>=1.8.2 in e:\git\pct\venv\lib\site-packages (from pytest->-r requirements_dev.txt (line 4)) (1.9.0)
Requirement already satisfied: zipp>=0.5 in e:\git\pct\venv\lib\site-packages (from importlib-metadata>=0.12->pytest->-r requirements_dev.txt (line 4)) (3.4.0)
Requirement already satisfied: MarkupSafe>=0.23 in e:\git\pct\venv\lib\site-packages (from Jinja2>=2.10.1->Flask->-r requirements_dev.txt (line 2)) (1.1.1)
Requirement already satisfied: pyparsing>=2.0.2 in e:\git\pct\venv\lib\site-packages (from packaging->pytest->-r requirements_dev.txt (line 4)) (2.4.7)
Requirement already satisfied: importlib-metadata>=0.12 in e:\git\pct\venv\lib\site-packages (from pytest->-r requirements_dev.txt (line 4)) (3.1.1)
Requirement already satisfied: six>=1.10 in e:\git\pct\venv\lib\site-packages (from PureCloudPlatformClientV2->-r requirements_dev.txt (line 6)) (1.15.0)
Using legacy 'setup.py install' for PureCloudPlatformClientV2, since package 'wheel' is not installed.
Installing collected packages: PureCloudPlatformClientV2, Mock, Flask, coverage
Running setup.py install for PureCloudPlatformClientV2 ... error
ERROR: Command errored out with exit status 1:
command: 'e:\git\pct\venv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\userX\\AppData\\Local\\Temp\\pip-install-fonuyq58\\pur
ecloudplatformclientv2_7ff0385817804628a37b8bafd35d01c7\\setup.py'"'"'; __file__='"'"'C:\\Users\\userX\\AppData\\Local\\Temp\\pip-install-fonuyq58\\purecloudplatformclientv2_7f
f0385817804628a37b8bafd35d01c7\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(co
de, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\userX\AppData\Local\Temp\pip-record-b6hjlf4c\install-record.txt' --single-version-externally-managed --compile --inst
all-headers 'e:\git\pct\venv\include\site\python3.7\PureCloudPlatformClientV2'
cwd: C:\Users\userX\AppData\Local\Temp\pip-install-fonuyq58\purecloudplatformclientv2_7ff0385817804628a37b8bafd35d01c7\
Complete output (2175 lines):
running install
running build
running build_py
creating build
creating build\lib
creating build\lib\PureCloudPlatformClientV2
copying PureCloudPlatformClientV2\api_client.py -> build\lib\PureCloudPlatformClientV2
copying PureCloudPlatformClientV2\configuration.py -> build\lib\PureCloudPlatformClientV2
copying PureCloudPlatformClientV2\purecloud_region_hosts.py -> build\lib\PureCloudPlatformClientV2
copying PureCloudPlatformClientV2\rest.py -> build\lib\PureCloudPlatformClientV2
copying PureCloudPlatformClientV2\utils.py -> build\lib\PureCloudPlatformClientV2
copying PureCloudPlatformClientV2\__init__.py -> build\lib\PureCloudPlatformClientV2
creating build\lib\PureCloudPlatformClientV2\apis
copying PureCloudPlatformClientV2\apis\alerting_api.py -> build\lib\PureCloudPlatformClientV2\apis
....... (A lot of similar copying logs are omitted here)
copying PureCloudPlatformClientV2\models\wfm_bu_short_term_forecast_import_complete_topic_wfm_versioned_entity_metadata.py -> build\lib\PureCloudPlatformClientV2\models
copying PureCloudPlatformClientV2\models\wfm_forecast_modification_interval_offset_value.py -> build\lib\PureCloudPlatformClientV2\models
copying PureCloudPlatformClientV2\models\wfm_historical_adherence_calculations_complete_topic_wfm_historical_adherence_calculations_complete_notice.py -> build\lib\PureClo
udPlatformClientV2\models
error: could not create 'build\lib\PureCloudPlatformClientV2\models\wfm_historical_adherence_calculations_complete_topic_wfm_historical_adherence_calculations_complete_not
ice.py': No such file or directory
----------------------------------------
ERROR: Command errored out with exit status 1: 'e:\git\pct\venv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\userX\\AppData\\Local
\\Temp\\pip-install-fonuyq58\\purecloudplatformclientv2_7ff0385817804628a37b8bafd35d01c7\\setup.py'"'"'; __file__='"'"'C:\\Users\\userX\\AppData\\Local\\Temp\\pip-install-fonuy
q58\\purecloudplatformclientv2_7ff0385817804628a37b8bafd35d01c7\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\
n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\userX\AppData\Local\Temp\pip-record-b6hjlf4c\install-record.txt' --single-version-ex
ternally-managed --compile --install-headers 'e:\git\pct\venv\include\site\python3.7\PureCloudPlatformClientV2' Check the logs for full command output.
(venv) E:\git\pct>python --version
Python 3.7.4
Does anyone hit the same issue like me?
Thanks,
Mark
1 Like
Hi,
I've successfully installed the same version on Windows 10 using Python version 3.7.4, pip version 19.0.3.
One piece of your log looks interesting;
Using legacy 'setup.py install' for PureCloudPlatformClientV2, since package 'wheel' is not installed.
Could you try installing wheel (pip install wheel
) and re-run the installation of the SDK. If that doesn't work then I'll have to take a deeper look at the issue.
markmou
December 15, 2020, 2:59am
3
Hi Ronan,
Thanks for the reply, I've tried to install the wheel package and rerun the package install command (pip install
-r requirement.txt), seems still getting the same error.
I also tried to clear my virtual env (remove the venv folder entirely) and recreated it in this project. But no luck, still hitting the same error.
Is it possible the filesystem path length limits on my dev box is different than yours?
(Microsoft Windows [Version 10.0.18363.1198])
Here is the log (The log is collected in python 3.6.8, and the error message is the same in python 3.7.4)
(venv) E:\git\pct>pip install wheel
Collecting wheel
Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel
Successfully installed wheel-0.36.2
(venv) E:\git\pct>pip install -r requirements_dev.txt
Collecting Flask
Using cached Flask-1.1.2-py2.py3-none-any.whl (94 kB)
Collecting Mock
Using cached mock-4.0.3-py3-none-any.whl (28 kB)
Collecting pytest
Downloading pytest-6.2.0-py3-none-any.whl (279 kB)
|████████████████████████████████| 279 kB 167 kB/s
Collecting coverage
Downloading coverage-5.3-cp36-cp36m-win_amd64.whl (208 kB)
|████████████████████████████████| 208 kB 204 kB/s
Collecting PureCloudPlatformClientV2
Using cached PureCloudPlatformClientV2-104.0.2.tar.gz (1.5 MB)
Collecting click>=5.1
Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
|████████████████████████████████| 82 kB 183 kB/s
Collecting Jinja2>=2.10.1
Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
|████████████████████████████████| 125 kB 204 kB/s
Collecting Werkzeug>=0.15
Downloading Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB)
|████████████████████████████████| 298 kB 243 kB/s
Collecting itsdangerous>=0.24
Downloading itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting MarkupSafe>=0.23
Downloading MarkupSafe-1.1.1-cp36-cp36m-win_amd64.whl (16 kB)
Collecting urllib3>=1.15
Downloading urllib3-1.26.2-py2.py3-none-any.whl (136 kB)
|████████████████████████████████| 136 kB 252 kB/s
Collecting six>=1.10
Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting certifi
Downloading certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
|████████████████████████████████| 147 kB 252 kB/s
Collecting python-dateutil
Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
|████████████████████████████████| 227 kB 139 kB/s
Collecting importlib-metadata>=0.12
Downloading importlib_metadata-3.3.0-py3-none-any.whl (10 kB)
Collecting colorama
Downloading colorama-0.4.4-py2.py3-none-any.whl (16 kB)
Collecting packaging
Downloading packaging-20.8-py2.py3-none-any.whl (39 kB)
Collecting atomicwrites>=1.0
Downloading atomicwrites-1.4.0-py2.py3-none-any.whl (6.8 kB)
Collecting attrs>=19.2.0
Downloading attrs-20.3.0-py2.py3-none-any.whl (49 kB)
|████████████████████████████████| 49 kB 230 kB/s
Collecting iniconfig
Downloading iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Collecting pluggy<1.0.0a1,>=0.12
Downloading pluggy-0.13.1-py2.py3-none-any.whl (18 kB)
Collecting toml
Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting py>=1.8.2
Downloading py-1.10.0-py2.py3-none-any.whl (97 kB)
|████████████████████████████████| 97 kB 288 kB/s
Collecting zipp>=0.5
Downloading zipp-3.4.0-py3-none-any.whl (5.2 kB)
Collecting typing-extensions>=3.6.4
Downloading typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
Collecting pyparsing>=2.0.2
Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
|████████████████████████████████| 67 kB 206 kB/s
Building wheels for collected packages: PureCloudPlatformClientV2
Building wheel for PureCloudPlatformClientV2 (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'e:\git\pct\venv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\userX\\AppData\\Local\\Temp\\pip-install-bh9604jw\\purec
loudplatformclientv2_582b1077bedb4cc094d0de05ecf999b8\\setup.py'"'"'; __file__='"'"'C:\\Users\\userX\\AppData\\Local\\Temp\\pip-install-bh9604jw\\purecloudplatformclientv2_582b
1077bedb4cc094d0de05ecf999b8\\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 'C:\Users\userX\AppData\Local\Temp\pip-wheel-cjmfirmh'
cwd: C:\Users\userX\AppData\Local\Temp\pip-install-bh9604jw\purecloudplatformclientv2_582b1077bedb4cc094d0de05ecf999b8\
Complete output (2175 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib
creating build\lib\PureCloudPlatformClientV2
copying PureCloudPlatformClientV2\api_client.py -> build\lib\PureCloudPlatformClientV2
copying PureCloudPlatformClientV2\configuration.py -> build\lib\PureCloudPlatformClientV2
copying PureCloudPlatformClientV2\purecloud_region_hosts.py -> build\lib\PureCloudPlatformClientV2
copying PureCloudPlatformClientV2\rest.py -> build\lib\PureCloudPlatformClientV2
copying PureCloudPlatformClientV2\utils.py -> build\lib\PureCloudPlatformClientV2
copying PureCloudPlatformClientV2\__init__.py -> build\lib\PureCloudPlatformClientV2
creating build\lib\PureCloudPlatformClientV2\apis
copying PureCloudPlatformClientV2\apis\alerting_api.py -> build\lib\PureCloudPlatformClientV2\apis
copying PureCloudPlatformClientV2\apis\analytics_api.py -> build\lib\PureCloudPlatformClientV2\apis
copying PureCloudPlatformClientV2\apis\architect_api.py -> build\lib\PureCloudPlatformClientV2\apis
copying PureCloudPlatformClientV2\apis\audit_api.py -> build\lib\PureCloudPlatformClientV2\apis
copying PureCloudPlatformClientV2\apis\authorization_api.py -> build\lib\PureCloudPlatformClientV2\apis
copying PureCloudPlatformClientV2\apis\billing_api.py -> build\lib\PureCloudPlatformClientV2\apis
copying PureCloudPlatformClientV2\apis\coaching_api.py -> build\lib\PureCloudPlatformClientV2\apis
copying PureCloudPlatformClientV2\apis\content_management_api.py -> build\lib\PureCloudPlatformClientV2\apis
copying PureCloudPlatformClientV2\apis\conversations_api.py -> build\lib\PureCloudPlatformClientV2\apis
copying PureCloudPlatformClientV2\apis\data_extensions_api.py -> build\lib\PureCloudPlatformClientV2\apis
copying PureCloudPlatformClientV2\apis\external_contacts_api.py -> build\lib\PureCloudPlatformClientV2\apis
copying PureCloudPlatformClientV2\apis\fax_api.py -> build\lib\PureCloudPlatformClientV2\apis
copying PureCloudPlatformClientV2\apis\flows_api.py -> build\lib\PureCloudPlatformClientV2\apis
copying PureCloudPlatformClientV2\apis\general_data_protection_regulation_api.py -> build\lib\PureCloudPlatformClientV2\apis
copying PureCloudPlatformClientV2\apis\geolocation_api.py -> build\lib\PureCloudPlatformClientV2\apis
....... (A lot of similar copying logs are omitted here)
copying PureCloudPlatformClientV2\models\wfm_bu_short_term_forecast_import_complete_topic_wfm_versioned_entity_metadata.py -> build\lib\PureCloudPlatformClientV2\models
copying PureCloudPlatformClientV2\models\wfm_forecast_modification_interval_offset_value.py -> build\lib\PureCloudPlatformClientV2\models
copying PureCloudPlatformClientV2\models\wfm_historical_adherence_calculations_complete_topic_wfm_historical_adherence_calculations_complete_notice.py -> build\lib\PureClo
udPlatformClientV2\models
error: could not create 'build\lib\PureCloudPlatformClientV2\models\wfm_historical_adherence_calculations_complete_topic_wfm_historical_adherence_calculations_complete_not
ice.py': No such file or directory
----------------------------------------
ERROR: Command errored out with exit status 1: 'e:\git\pct\venv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\userX\\AppData\\Local
\\Temp\\pip-install-bh9604jw\\purecloudplatformclientv2_582b1077bedb4cc094d0de05ecf999b8\\setup.py'"'"'; __file__='"'"'C:\\Users\\userX\\AppData\\Local\\Temp\\pip-install-bh960
4jw\\purecloudplatformclientv2_582b1077bedb4cc094d0de05ecf999b8\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\
n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\userX\AppData\Local\Temp\pip-record-u811iw0w\install-record.txt' --single-version-ex
ternally-managed --compile --install-headers 'e:\git\pct\venv\include\site\python3.6\PureCloudPlatformClientV2' Check the logs for full command output.
(venv) E:\git\pct>
Thanks and best regards,
Mark
Is it possible the filesystem path length limits on my dev box is different than yours?
When I installed python yesterday to reproduce your issue there was an option to disable the path limit at the end of the installation process. You could certainly re-install Python and select the option to disable the path limit or follow one of the guides on how to remove it.
Hope this helps,
Ronan
markmou
December 16, 2020, 12:49am
5
Hi Ronan,
I just followed the instructions you've mentioned, found that there is no such group policy object under Local Computer Policy\Computer Configuration\Administrative Templates\System\Filesystem\NTFS
But I enabled the "Enable Win32 long paths" policy (Local Computer Policy\Computer Configuration\Administrative Templates\System\Filesystem\Enable Win32 long paths), and did a "gpupdate", it works!
I think it is possible that the name/path of the policy differs depending on the version of Windows.
Thanks,
Mark
system
Closed
January 16, 2021, 12:53am
6
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.