Repository navigation
Description
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Admin\anaconda3\python.exe' 'C:\Users\Admin\anaconda3\lib\site-packages\pip_vendor\pep517_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\Public\Documents\Wondershare\CreatorTemp\tmpx_5j19l6'
cwd: C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-epnttnfe\cvxpy
Complete output (55 lines):
running dist_info
creating C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-modern-metadata-mf4pu3yb\cvxpy.egg-info
writing C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-modern-metadata-mf4pu3yb\cvxpy.egg-info\PKG-INFO
writing dependency_links to C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-modern-metadata-mf4pu3yb\cvxpy.egg-info\dependency_links.txt
writing requirements to C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-modern-metadata-mf4pu3yb\cvxpy.egg-info\requires.txt
writing top-level names to C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-modern-metadata-mf4pu3yb\cvxpy.egg-info\top_level.txt
writing manifest file 'C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-modern-metadata-mf4pu3yb\cvxpy.egg-info\SOURCES.txt'
Traceback (most recent call last):
File "C:\Users\Admin\anaconda3\lib\site-packages\pip_vendor\pep517_in_process.py", line 280, in
main()
File "C:\Users\Admin\anaconda3\lib\site-packages\pip_vendor\pep517_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\Admin\anaconda3\lib\site-packages\pip_vendor\pep517_in_process.py", line 133, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-build-env-1qyn7fx2\overlay\Lib\site-packages\setuptools\build_meta.py", line 161, in prepare_metadata_for_build_wheel
self.run_setup()
File "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-build-env-1qyn7fx2\overlay\Lib\site-packages\setuptools\build_meta.py", line 253, in run_setup
super(BuildMetaLegacyBackend,
File "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-build-env-1qyn7fx2\overlay\Lib\site-packages\setuptools\build_meta.py", line 145, in run_setup
exec(compile(code, file, 'exec'), locals())
File "setup.py", line 57, in
setup(
File "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-build-env-1qyn7fx2\overlay\Lib\site-packages\setuptools_init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Admin\anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Admin\anaconda3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\Admin\anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-build-env-1qyn7fx2\overlay\Lib\site-packages\setuptools\command\dist_info.py", line 31, in run
egg_info.run()
File "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-build-env-1qyn7fx2\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 298, in run
self.find_sources()
File "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-build-env-1qyn7fx2\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 305, in find_sources
mm.run()
File "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-build-env-1qyn7fx2\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 536, in run
self.add_defaults()
File "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-build-env-1qyn7fx2\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 572, in add_defaults
sdist.add_defaults(self)
File "C:\Users\Admin\anaconda3\lib\distutils\command\sdist.py", line 228, in add_defaults
self._add_defaults_ext()
File "C:\Users\Admin\anaconda3\lib\distutils\command\sdist.py", line 311, in add_defaults_ext
build_ext = self.get_finalized_command('build_ext')
File "C:\Users\Admin\anaconda3\lib\distutils\cmd.py", line 299, in get_finalized_command
cmd_obj.ensure_finalized()
File "C:\Users\Admin\anaconda3\lib\distutils\cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "setup.py", line 23, in finalize_options
import numpy
File "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-build-env-1qyn7fx2\overlay\Lib\site-packages\numpy_init.py", line 305, in
win_os_check()
File "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-build-env-1qyn7fx2\overlay\Lib\site-packages\numpy_init.py", line 302, in _win_os_check
raise RuntimeError(msg.format(file)) from None
RuntimeError: The current Numpy installation ('C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-build-env-1qyn7fx2\overlay\Lib\site-packages\numpy\init.py') fails to pass a sanity check due to a bug in the windows runtime. See this issue for more information: https://tinyurl.com/y3dm3h86
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Admin\anaconda3\python.exe' 'C:\Users\Admin\anaconda3\lib\site-packages\pip_vendor\pep517_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\Public\Documents\Wondershare\CreatorTemp\tmpx_5j19l6' Check the logs for full command output.
Activity
robertmartin8 commentedon Nov 19, 2020
Hi @buya7, have you followed the windows-specific instructions for cvxpy (as discussed here)?
buya7 commentedon Nov 19, 2020
Hi @robertmartin8, thank you for your reply. Indeed, I have followed the instructions for Windows. First installed C++ via Visual Studio and then used "pip install PyPortfolioOpt".
robertmartin8 commentedon Nov 19, 2020
@buya7 Thanks for letting me know! Could you please try to
pip install cvxpyto see if that's causing the problems?buya7 commentedon Nov 19, 2020
@robertmartin8 Yes, I received a similar error message with
pip install cvxpysven-borden commentedon Nov 20, 2020
Actually as stated at the end of your error @buya7, it is related to numpy installation on python 3.7 and 3.8 from what I have been tested on. I don't know any workaround now except going to python 3.6 waiting it to be resolved. Eventually installing a previous release of numpy would works
buya7 commentedon Nov 21, 2020
Hi @sven-borden , thank you very much for your response. I created a new environment running Python 3.6 and added it to Jupyter Notebook. I think I managed to install PyPortfolioOpt, but when I went to jupyter (using the new env) it says that PyPortfolioOpt cannot be found. Moreover, when I ask to check the build it still says py 38_0
packages in environment at C:\Users\Admin\anaconda3\envs\myenv:
Name Version Build Channel
certifi 2020.6.20 pyhd3eb1b0_3
cvxopt 1.2.5.post1 pypi_0 pypi
cvxpy 1.1.7 pypi_0 pypi
ecos 2.0.7.post1 pypi_0 pypi
future 0.18.2 pypi_0 pypi
numpy 1.19.3 pypi_0 pypi
osqp 0.6.1 pypi_0 pypi
pandas 1.1.4 pypi_0 pypi
pip 20.2.4 py36haa95532_0
pyportfolioopt 1.2.7 pypi_0 pypi
python 3.6.12 h5500b2f_2
python-dateutil 2.8.1 pypi_0 pypi
pytz 2020.4 pypi_0 pypi
scipy 1.5.4 pypi_0 pypi
scs 2.1.2 pypi_0 pypi
setuptools 50.3.1 py36haa95532_1
six 1.15.0 pypi_0 pypi
sqlite 3.33.0 h2a8f88b_0
vc 14.1 h0510ff6_4
vs2015_runtime 14.16.27012 hf0eaf9b_3
wheel 0.35.1 pyhd3eb1b0_0
wincertstore 0.2 py36h7fe50ca_0
zlib 1.2.11 h62dcd97_4
sven-borden commentedon Nov 21, 2020
@buya7 that's already a step forward, could you share the code you are trying to run?
buya7 commentedon Nov 21, 2020
@sven-borden For the environment I used
conda create -n myenv python=3.6andconda activate myenvThen I ranpip install numpy==1.19.3and thenpip install PyPortfolioOptAfter that to add the env to Jupyter I usedpip install --user ipykernelandpython -m ipykernel install --user --name=myenvNow in Jupyter I can create new files with using the new env but it seems that it doesn't work correctly.buya7 commentedon Nov 21, 2020
@sven-borden I am trying to run
from pypfopt import EfficieantFrontier;from pypfopt import risk_modelsandfrom pypfopt import expected_returnssven-borden commentedon Nov 21, 2020
@buya7 I reproduced your step exactly except that I ran on a jupyter notebook from my newly created env and I can import them well. I guess something wrong is happening with python env finding modules. My "stupid" guess would be to reboot the computer and create new environment a few time to check if it is consistant or not.
Sorry I don't bring a lots of answers here :(
sven-borden commentedon Nov 21, 2020
If it may helps, here are the exact packages in my env.
x829901 commentedon Nov 29, 2020
This worked for me. Hopefully, this issue gets fixed.
robertmartin8 commentedon Nov 30, 2020
Fixed in #230