Skip to content

create env under Windows + Conda #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
terrychan999 opened this issue Aug 1, 2020 · 7 comments
Open

create env under Windows + Conda #32

terrychan999 opened this issue Aug 1, 2020 · 7 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@terrychan999
Copy link
Contributor

terrychan999 commented Aug 1, 2020

create conda environments: conda create -n env_name

get into the environment: conda activate env_name

install python and the dependencies:

  • conda install python=3.7
  • conda install -c conda-forge pelican
  • conda install markdown

go to the swportal folder you cloned:

  • pelican content -s pelicanconf.py
  • cd output
  • python -m pelican.server

the are some bugs with pelican --autoreload --listen
it will result in OSError: [WinError 87]
ref: getpelican/pelican#2400
so you can only compile website and depoly/publish through the command above now

@terrychan999 terrychan999 changed the title run env under windows + conda create env under windows + conda Aug 1, 2020
@terrychan999 terrychan999 changed the title create env under windows + conda create env under Windows + Conda Aug 1, 2020
@yungyuc
Copy link
Contributor

yungyuc commented Aug 1, 2020

Thank you @terrychan999 for reporting this. Is this a bug in pelican, or something we need to fix in swportal?

@terrychan999
Copy link
Contributor Author

Yes, it's a bug in pelican. I just found out the bug was fixed with getpelican/pelican#2750
But it is now on the master branch, hasn't become a new release version.

@terrychan999
Copy link
Contributor Author

The bug is fixed in the new release version https://github.com/getpelican/pelican/releases/tag/4.5.0

But the installation steps should change a little bit:
Although the version of Pelican on conda-forge is update-to-date
It will cause "condaVerificationError" during install (maybe due to the non-unicode system locale/path incompatible)
So changing the command to "pip install pelican[markdown]" will be better
This will install both Pelican(and its dependencies) and Markdown

If you got any conda dependencies error, do conda clean --all may fix your problem
Caution: conda clean --all will remove all the packages inside your conda environment

New Steps example:

conda create -n env_name
conda activate env_name
conda install python=3.7
pip install "pelican[markdown]"
pelican --autoreload --listen

@yungyuc
Copy link
Contributor

yungyuc commented Oct 18, 2020

What should we do with this issue? Any comments?

@terrychan999
Copy link
Contributor Author

Actually this issue can be closed.
Just like to share a way to set up environment with Windows.

@yungyuc
Copy link
Contributor

yungyuc commented Oct 18, 2020

It may be a good idea to add the description to a file along with README. How do you think?

@terrychan999
Copy link
Contributor Author

Sounds great. I will make a pull request for it :)

@yungyuc yungyuc added the documentation Improvements or additions to documentation label Oct 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants